PHP provides many pre-defined methods to deal with strings. One of the strong way to deal with strings is to use regular expressions aka ‘regex‘. Let’s use regular expression with preg_replace() method to strip excess whitespace from a string.
PHP provides many pre-defined methods to deal with strings. One of the strong way to deal with strings is to use regular expressions aka ‘regex‘. Let’s use regular expression with preg_replace() method to strip excess whitespace from a string.
© 2012 SachinKRaj weBLOG. All Rights Reserved.