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. Quote 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. Quote 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. Quote 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. Quote 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.. Quote 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... Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.