Jump to content

How to write ( str_replace )


egturnkey

Recommended Posts

hello dear friends,

 

If i have

 

$manal = "thank you for help";

 

and

 

$URL = "siteroot/index.php?r$id";

 

then i will create a URL but i will remove whitespace

 

$manal = str_replace('  ', '-', trim($manal));

 

then i will make the link as follow

 

$URL = "siteroot/$manal-$id.html";

 

but it needs .htaccess Okay then let say

 

RewriteRule -(.*)\.html index.php?r=$1

 

 

NOW the problem it won't works and works only if i removed

$manal = str_replace('  ', '-', trim($manal));

so is there any prblem with .htaccess and str_replace or am i did something wrong !!

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/195179-how-to-write-str_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.