What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php, preg replace help

php, preg replace help
Author: Message:
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: php, preg replace help
psuedo..

code:
if left(URL, 7) != "http://" then
URL = "http://" & URL
end if


thats how i would do it...

in php thats something like..

code:
$pos = strpos($URL, "http://");

if ($pos === false) {
   $URL = "http://". $URL . "";
} else {
   echo "its there :D";
}


This post was edited on 10-23-2005 at 11:49 PM by Stigmata.
10-23-2005 11:24 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
php, preg replace help - by Ezra on 10-23-2005 at 11:17 PM
RE: php, preg replace help - by KeyStorm on 10-23-2005 at 11:23 PM
RE: php, preg replace help - by Ezra on 10-23-2005 at 11:24 PM
RE: php, preg replace help - by Stigmata on 10-23-2005 at 11:24 PM
RE: php, preg replace help - by Ezra on 10-23-2005 at 11:32 PM
RE: php, preg replace help - by brian on 10-24-2005 at 01:10 AM
RE: php, preg replace help - by Ezra on 10-24-2005 at 12:47 PM
RE: php, preg replace help - by Stigmata on 10-24-2005 at 01:05 PM
RE: php, preg replace help - by J-Thread on 10-24-2005 at 01:24 PM
RE: php, preg replace help - by Ezra on 10-24-2005 at 02:28 PM
RE: php, preg replace help - by WDZ on 10-24-2005 at 02:32 PM
RE: php, preg replace help - by J-Thread on 10-24-2005 at 03:00 PM
RE: php, preg replace help - by Ezra on 10-24-2005 at 03:27 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On