when I view source on my php page I get "
for a quote. But instead, I would like "
to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing.
views:
102answers:
2
A:
You could do this very simply using str_replace
.
$string = str_replace('"', '"', $string);
However, as Levi said, why not just leave it this way? It should have no effect on the display.
Arda Xi
2010-04-20 20:22:16
I think the issue is due to the fact that he needs to take the source output and input into something else. The is causing the issue.
Levi Hackwith
2010-04-20 20:25:39
+3
A:
If you have access to the PHP and want to change all html special characters to their rightful variations use:
print htmlspecialchars_decode($string);
I think this is the best way given what is being attempted here. +1
Levi Hackwith
2010-04-20 20:26:49