Tag Archives: String

PHP UTF-8 String Length

If you’ve got an UTF-8 encoded PHP string (e.g. when working with DOMDocument) and you don’t want to rely on the mbstring extension to get it’s length, this can be solved with a simple regular expression (as the string does … Continue reading

Posted in PHP Development, PHP Library, Pressed, The Know Your Language Department | Tagged , , , , , , , , | 1 Comment

PHP list(), Strings and Array Access

Array-Access on strings (not the SPL this time) goes that far in PHP when thrown against a list(): That will output: “A, B”. Okay great. For more, imagine this then: Which will output: “AB, A, B”. It’s only array access, … Continue reading


Posted in PHP Development, Pressed | Tagged , , , , , | Leave a comment

Encode a PHP String

Today I updated PHPMyadmin on one of my boxes. Nothing special so far, but I saw that it’s now possible to export data in form of a PHP array. Well I thought that’s somehow nice. But the plugin was broken. … Continue reading

Posted in Pressed | Tagged , , , | Leave a comment