Forum Moderators: coopster

Message Too Old, No Replies

search in string

         

pelachrum

1:54 am on Jan 16, 2006 (gmt 0)

10+ Year Member



is there a predefined function to search a string for specified characters/words, anything defined ahead of the time?

phparion

4:37 am on Jan 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<?php

$a = "i am a string and someone wants to search 'to be searched' ";

$targetstring = "to be searched";

if(stristr($a, $targetstring) === FALSE) {
echo "string not found" ;
}

?>