String
1. remove all spaces from a string
Syntax :
string PhpAlgo\Str\removeallSpaces(string $str);
- Description : Remove all spaces from a string.
- Parameters :
- $str : the string that you want to remove all spaces from.
- Return Value : return a string without any single space.
Example :
$str = PhpAlgo\Str\removeallSpaces("all spaces will be removed from this string") ;
echo $str;
Output :
allspaceswillberemovedfromthisstring