homepage Welcome to WebmasterWorld Guest from 54.196.77.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
search in string
pelachrum




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

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

 

phparion




msg:1268657
 4:37 am on Jan 16, 2006 (gmt 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" ;
}

?>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved