note 21631 modified in function.str-replace by torben

From: Date: Tue, 21 May 2002 19:44:58 +0000
Subject: note 21631 modified in function.str-replace by torben
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-30860@lists.php.net to get a copy of this message
Hello ! Detz a simple example of how to use this function. The following example delete every whitespaces becoming them into nothing. <? $string="here are some words !"; echo str_replace(" ","",$string); #it returns "herearesomewords!" ?> Its very useful when were talkin` about extensive numbers and registers. Thanx ! (:^>)-| [ed. note: This does not remove all whitespace, just all space characters. It has no effect on tabs, newlines, etc.] --was-- Hello ! Detz a simple example of how to use this function. The following example delete every whitespaces becoming them into nothing. <? $string="here are some words !"; echo str_replace(" ","",$string); #it returns "herearesomewords!" ?> Its very useful when were talkin` about extensive numbers and registers. Thanx ! (:^>)-| http://www.php.net/manual/en/function.str-replace.php

« previous php.notes (#30860) next »