views:

102

answers:

2

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.

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
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
+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
this worked, thanks.
Joseph