In some of my PHP scripts, the following line will tell me how many musical notes are in $myText…
…yet in other of my PHP scripts, the same line does not work for me.
I think I need to be declaring a decoding type to get this to work correctly, but I haven’t identified what that is. I thought the secret was the meta tag I’ve pasted below, but I’ve added it to the beginning of my latest PHP script and the above code still does not work. Any suggestions on how I can get PHP to always recognize musical notes as musical notes? (Right now it’s recognizing the note as a hashtag, judging by the ord value that it returns for the note character.)
<meta http-equiv=”Content-type” content=”text/html; charset=utf-8″ />