What would be the best to use for..
Posted 12 October 2006 - 04:54 AM
I query sql for certain info , the info that returns is say a block of text, what i am looking at wanting to do is to stop display when it sees a certain tag, ie a block of text and within that text is <!stop> , when it see's that it won't display anything beyond that tag.
If somebody could point me in the right direction i would be most grateful.
Posted 12 October 2006 - 06:33 AM
<?php $mystring = 'This is a long block of usles text <!stop> that goes on forever.'; $findme = '<!stop>'; $pos = strpos($mystring, $findme); $ShortStr = substr($mystring, 0, $pos); echo $ShortStr; ?>
Posted 12 October 2006 - 06:51 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users