return first full sentence of a string?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 26
Joined: Thu Jan 16, 2003 6:05 am

Mon Feb 10, 2003 8:14 am

Well I'm kinda new to the whole php thing but i might be able to help a wee bit and if it is no help sure i've lost nothin.

To get a sentence out I might try using strtok() with a delimiter of "."

somethin like

$test = "hello, my name is Joe. I am 20";
$delimiter = ".";
$sentence = strtok($test, $delimiter);
print $sentence;

for me this outputted "hello, my name is Joe"

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests