PHP removing a character in a string

I think that it’s better to use simply str_replace, like the manual says:

If you don’t need fancy replacing
rules (like regular expressions), you
should always use this function
instead of ereg_replace() or
preg_replace().

<?
$badUrl = "http://www.site.com/backend.php?/c=crud&m=index&t=care";
$goodUrl = str_replace('?/', '?', $badUrl);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)