I have a database where the fields are stored in UTF8 and utf_general_ci. I'm pulling the data from the database and I then want to see if a pulled value is in a fixed array which I've coded into php (array("home","▄ber
For some reason this doesn't seem to work. I've tried setting the Internal/External/Output character encodings and played with other settings, including utf8_en/decoding it as well. Even though in text, the value from MySQL reads "strona głˇwna" (which I believe means Home page in Polish) it doesn't get found with in_array.
I am using SET NAMES so the data should be coming out as UTF8 but it won't compare with the array. I'm not sure if I need to set something in PHP to make my array get read as fully UTF8 - even if the characters themselves are UTF8?
If the array is hard coded, and your IDE is using UTF-8, then I can't see any reason why it wouldn't compare. I just ran a test and it worked fine for me. All I can think of is that your IDE is using something other than UTF-8.