0

Hi, I am using a $get function to get a variable from the URL as my page subtitle. It works fine except if the variable has an apostrophe in it. Then the title has a backslash in front of the apostrophe (probably to escape that apostrophe). Not sure how to remove that back slash only in the page title , not the url variable.

I've tried htmlentities, urlencode, rawurlencode, urldecode, rawurldecode.

Any help would be appreciated.

thank you

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by coolest_987
0

Simply use str_replace as the following:

$X = $_GET['X'];
$pageTitle = str_replace('\\','',$X);

end quote.

thank you both of these worked perfect!

Edited by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.