June 13th, 2000, 02:13 AM
-
I'm trying to get my PHP code to filter out fields that just have "http://" in them, but fields that have mor than "http://" such as "http://www.blah.com" should continue to be displayed. I've been trying to use the following code:
if ($bizlogo_addy != "http://") {
echo "<p><img src="" , $row["bizlogo_addy"] , "" border="1" align="top"></p>";
}
And it makes no difference. It'll still display fields with or without just "http://". If I change the != to ==, then it doesn't display anything. PLEASE HELP!
Apunkah
June 13th, 2000, 02:58 AM
-
I'm trying to get my PHP code to filter out fields that just have "http://" in them, but fields that have mor than "http://" such as "http://www.blah.com" should continue to be displayed. I've been trying to use the following code:
see ..for this you can simply check the string length and proceed further.
if(strlen($bizlogo_addy)==7){
//only http://
}else{
// http://www.blah.com
}
this is very easy solution...
Or
you should use a regular expression match
using ereg() function for fining out this.
------------------
SR -
shiju.dreamcenter.net
"The fear of the LORD is the beginning of knowledge..."
[This message has been edited by Shiju Rajan (edited June 13, 2000).]