Created
November 9, 2012 08:57
-
-
Save klaasvw/4044592 to your computer and use it in GitHub Desktop.
Non breaking space, decode_entities and strtotime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Replace by a space because decode_entities will replace it by | |
// ASCII code 160. See http://php.net/manual/en/function.html-entity-decode.php. | |
// Replacing chr(160) afterwards results in an unknown char for some | |
// reason. | |
// Note that strtotime will result in FALSE if ASCII code 160 is present in the string. | |
$value = str_replace(' ', ' ', $value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment