GerhardL Posted January 8, 2015 Share Posted January 8, 2015 Hi.I have this line of code: $b = '@'; If I echo($b), then it displays correctly in the browser: '@'But, when I look at $b on the server with the debugger, I find its value to be '& #8212;' (remove space)If I use '@' in an email address - like [email protected] - it also changes to b& #8212;b.com (remove space)So, although it echo correctly, it does not work in email addresses used to read user accounts.1. Why does the value change?2. Why is it changed to the html code of a dash (-) and not the html code of the '@' character?I tried urlDecode() and str_replace() - but no success.I use php 5.3.8Thanx Link to comment https://forums.phpfreaks.com/topic/293755-php-converts-to/ Share on other sites More sharing options...
GerhardL Posted January 8, 2015 Author Share Posted January 8, 2015 Okay I find that it still works right inside the controller as well - although the debugger shows the value of the '@' as being '& #8212;'. But it is still weird. Maybe it is just a debugger issue, because everything else looks fine. Thanx. Link to comment https://forums.phpfreaks.com/topic/293755-php-converts-to/#findComment-1502182 Share on other sites More sharing options...
hansford Posted January 8, 2015 Share Posted January 8, 2015 echo html_entity_decode('—', ENT_COMPAT, 'UTF-8'); Link to comment https://forums.phpfreaks.com/topic/293755-php-converts-to/#findComment-1502185 Share on other sites More sharing options...
hansford Posted January 8, 2015 Share Posted January 8, 2015 Nothing weird - perfectly normal - do the research. Link to comment https://forums.phpfreaks.com/topic/293755-php-converts-to/#findComment-1502186 Share on other sites More sharing options...
GerhardL Posted January 12, 2015 Author Share Posted January 12, 2015 It is a bug in the debugger, which they will sort out. Thanx. Link to comment https://forums.phpfreaks.com/topic/293755-php-converts-to/#findComment-1502644 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.