fohanlon Posted September 27, 2011 Share Posted September 27, 2011 Hi I am reading the contents of a file into a variable as follows: file_get_contents($pathtofile); If the file contains say just 3 € (euro) symbols as an example and I output the strlen I get 9 instead of 3. Could anyone tell me how I could sort of the contents (the 3 euro symbols) so I can get strlen as 3. I tried utf8_decode etc. Many Thanks Fergal. Quote Link to comment Share on other sites More sharing options...
requinix Posted September 27, 2011 Share Posted September 27, 2011 Use mb_strlen instead. Quote Link to comment 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.