Tag Archives — Strings
PHP String Functions (All on One Page)
addcslashes() — Quote string with slashes in a C style addslashes() — Quote string with slashes bin2hex() — Convert binary data into hexadecimal representation chop() — Alias of rtrim chr() — Generate a single-byte string from a number chunk_split() — Split a string into smaller chunks convert_cyr_string() — Convert from one Cyrillic character set to […]
How Can I Strip all Whitespace Characters in a String in PHP?
Many times, the strings that you are manipulating in a PHP project will have extra spaces that need to be removed. For instance, you might want to replace multiple spaces with a single space or you might want to get rid of all the whitespace in a string. Similarly, you might be planning on stripping […]