Gleasonator Posted September 8, 2008 Share Posted September 8, 2008 Hi, if I want to echo an odd symbol (such as a heart... ♥) is there an easy way to do so? Using echo "♥"; displays this: ♥ Thanks. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/ Share on other sites More sharing options...
Mchl Posted September 8, 2008 Share Posted September 8, 2008 Encoding of your php script file should match encoding of echoed HTML. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-636942 Share on other sites More sharing options...
Gleasonator Posted September 8, 2008 Author Share Posted September 8, 2008 Sorry, but I'm not sure what "encoding" is (I don't have a good understanding, at least). :-\ I did search the symbol, however, and it said that it's a Unicode symbol. It appears on the Windows character map. Thanks for any more help you can give. Please excuse my ignorance of the subject. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-636966 Share on other sites More sharing options...
Mchl Posted September 8, 2008 Share Posted September 8, 2008 In other words, you have to save your script as utf-8 (without BOM). Notepad++ can do it. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-636971 Share on other sites More sharing options...
Adam Posted September 8, 2008 Share Posted September 8, 2008 Try looking at HTML symbols... http://www.w3schools.com/tags/ref_symbols.asp heart is represented as "♥" i believe.. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-636972 Share on other sites More sharing options...
Mchl Posted September 8, 2008 Share Posted September 8, 2008 That's the safest way. Forgot about it... Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-636973 Share on other sites More sharing options...
Gleasonator Posted September 8, 2008 Author Share Posted September 8, 2008 Thanks a bunch, guys. You rule. Link to comment https://forums.phpfreaks.com/topic/123327-solved-getting-weird-symbols-to-display/#findComment-637025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.