Mar
3
2010

stristr – Searching inside a text string

$main_string="This is a test string <a href=http://www.plus2net.com>with a link</a> to plus2net";
if(($main_string,"http://")){
echo "String contains a link or the text http:// inside it ";}
else {
echo "String does not contains a link or the text http:// inside it ";}

About the Author: Urban Cetinski

Urban Cetinski :)

Leave a comment

Get Adobe Flash playerPlugin by wpburn.com wordpress themes