Welcome to WebmasterWorld Guest from 54.211.136.250

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

search in string

   
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?
4:37 am on Jan 16, 2006 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



<?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" ;
}

?>