quot;http://www.$url";;
}
return $result;
}
?>
-Original Message-
From: Frank Voorburg [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 10, 2004 9:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Help Formatting String into URL
Ryan,
You can use
Ryan,
You can use the following function:
function FormatUrl($url)
{
if (eregi("www", $url))
$result = "http://$url";;
else
$result = "http://www.$url";;
return $result;
}
You can test it using:
$test1 = FormatUrl("google.com");
$test2 = FormatUrl("www.google.com");
print "test1 =
2 matches
Mail list logo