html_entity_decode problem in PHP?
I am trying to convert HTML entities from a source string to their literal character equivalent. For example: <?php $string = "Hello – World"; $converted = html_entity_decode($string); ?> Whilst this rightly converts the entity on screen, when I look at the HTML code it is still showing the explicit entity. I need to change that so that it literally converts the entity as I am not using the string within an HTML page. Any ideas on what I am doing wrong? FYI I am sending the converted string to Apple's Push notification service: $payload['aps'] = array('alert' => $converted, 'badge' => 1,