Hello all,
I've been struggling for a few days with the question of how to convert
"smart" (curly) quotes into straight quotes. I tried playing with the
htmlentities() function, but all that is doing is changing the smart
quotes into nonsense characters. I also searched the web for quite a
while and was unsuccessful in finding a solution.
What puzzles me is that doing it the other way around is simple enough.
For example, this works fine in converting a straight quote into an
"open" smart quote:
if ($content[$k] == "\"")
$content = substr($content , 0, $k) . "" . substr
($content, $k+1, strlen($content )-$k+1);
But the other way around doesn't work. Any ideas?
Thanks,
Martin Goldman
My e-mail addresse's correct domain name is mgoldman.com.
I've been struggling for a few days with the question of how to convert
"smart" (curly) quotes into straight quotes. I tried playing with the
htmlentities() function, but all that is doing is changing the smart
quotes into nonsense characters. I also searched the web for quite a
while and was unsuccessful in finding a solution.
What puzzles me is that doing it the other way around is simple enough.
For example, this works fine in converting a straight quote into an
"open" smart quote:
if ($content[$k] == "\"")
$content = substr($content , 0, $k) . "" . substr
($content, $k+1, strlen($content )-$k+1);
But the other way around doesn't work. Any ideas?
Thanks,
Martin Goldman
My e-mail addresse's correct domain name is mgoldman.com.
Comment