Jump to content


Photo

Use str_replace


  • Please log in to reply
1 reply to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 27 July 2006 - 01:56 AM

How would I use str_replace with this:

$SITE_URL = "http://system.dotomega.com";

In another file I included config.php which has that variable.

I want to use str_replace to remove http:// and replace it with nothing.

#2 rab

rab
  • Members
  • PipPipPip
  • Advanced Member
  • 155 posts

Posted 27 July 2006 - 02:19 AM

include "config.php";

$site_url = str_replace("http://", "", $SITE_URL);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users