Jump to content

decoding help


Torrie

Recommended Posts

Hello friends! Miss me? :-)

 
I can't get html characters to decode properly. Please help me at least get this to work:
 
The "html character" for an apostrophe is this:
'
 
How do I turn this:
'
into this:
'
 
Here is "pseudo-code" to help clarify the type of answer I want:
 
Hi Christy, here is your answer:
<?php
$character = ''';
$decoded = magic_decoder_function($character);
echo $decoded;
?>
 
Thank you,
Hugs and kisses,
-Torrie
 
Link to comment
https://forums.phpfreaks.com/topic/297272-decoding-help/
Share on other sites

That was the first thing I tried -- I tried that, and it did not work: I tried both:
 
echo html_entity_decode(''');
echo htmlspecialchars_decode(''');
 
I still get '
Link to comment
https://forums.phpfreaks.com/topic/297272-decoding-help/#findComment-1516187
Share on other sites

That would only work for one individual string at a time

echo str_replace(''',"'",$string);

 

I want a php function that decodes all html characters.

 

For some reason, nothing decodes the apostrophe '

 

Try it in your bash/terminal/putty and you'll see it don't work at all.

 

Anyone?

Link to comment
https://forums.phpfreaks.com/topic/297272-decoding-help/#findComment-1516188
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.