* Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]):
> $P1OC1Q1 = "1¶some text or some comment";
> 
> echo "<tr><td>Your score is: </td><td>"; $score=split($P1OC1Q1,"¶"); echo 
> $score[0]."</td></tr>\n";
> 
> Do I have to go through all that to get score[0] ?

substr($P1OC1Q1, 0, strpos($P1OC1Q1, '¶')-1)

That will return every thing to the left of '¶'. and '' if nothing
is there without complaining.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to