note 13992 deleted from function.str-repeat by jimw
| From: | jimw@php.net | Date: | Wed, 02 Jan 2002 11:52:14 +0000 |
| Subject: | note 13992 deleted from function.str-repeat by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-24240@lists.php.net to get a copy of this message | ||
For those of use without php4, heres a function I made that behaves the same way...
function str_repeat($str,$num=1){
while($num > 0){
$out .= $str;
$num--;
}
return $out;
}
echo str_repeat("i_",2);
Will echo "i_i_"
-Squ http://mf.monstur.com/