Welcome to WebmasterWorld Guest from 54.196.153.46

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

search in string

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

Junior Member

10+ Year Member

joined:Jan 16, 2004
posts:61
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 9, 2005
posts:817
votes: 0


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

?>