Quantcast
Channel: mmikkel.no» PHP | mmikkel.no
Browsing all 2 articles
Browse latest View live

Avoid PHP json_encode returning null for special character strings

So, there’s a bug in PHP which makes json_encode() return null for any strings containing special characters like æ, ø or å. json_encode works well with UTF-8, so converting any strings to UTF-8 should...

View Article



PHP substr() and UTF-8

Note to self: Turns out substr() breaks special characters in UTF-8. Use mb_substr() instead.

View Article
Browsing all 2 articles
Browse latest View live




Latest Images