note 94449 deleted from function.stripos by danbrown
| From: | danbrown@php.net | Date: | Fri, 06 Nov 2009 15:03:22 +0000 |
| Subject: | note 94449 deleted from function.stripos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162456@lists.php.net to get a copy of this message | ||
Note Submitter: pulketo (at] gmail dout com
----
Eliminates double triple quad .... spaces in a text
ex:
echo noSpacer("cuak is near the table");
will get this output:
cuak is near the table
function noSpacer($entrada)
{
$entrada=trim($entrada);
while (stripos($entrada," "))
{
$entrada=str_replace(" "," ",$entrada);
}
return $entrada;
}
if this function already exists ignore me (don't beat me :P )