note 75181 added to function.str-repeat
| From: | Mattias at osu1 dot php dot net | Date: | Wed, 16 May 2007 19:45:30 +0000 |
| Subject: | note 75181 added to function.str-repeat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126649@lists.php.net to get a copy of this message | ||
<?php
if(!function_exists("str_repeat")) {
function str_repeat($word, $length) {
$repeated = "";
for($i=0; $i < $length; $i++) {
$repeated .= $word;
}
return $repeated;
}
}
?>
can also be written as:
<?php
if(!function_exists("str_repeat")) {
function str_repeat($word, $length) {
for($repeated = "",$i=0; $i < $length; $i++)
$repeated .= $word;
return $repeated;
}
}
?>
----
Server IP: 129.16.214.50
Probable Submitter: 213.66.105.68
----
Manual Page -- http://www.php.net/manual/en/function.str-repeat.php
Edit -- https://master.php.net/note/edit/75181
Del: integrated -- https://master.php.net/note/delete/75181/integrated
Del: useless -- https://master.php.net/note/delete/75181/useless
Del: bad code -- https://master.php.net/note/delete/75181/bad+code
Del: spam -- https://master.php.net/note/delete/75181/spam
Del: non-english -- https://master.php.net/note/delete/75181/non-english
Del: in docs -- https://master.php.net/note/delete/75181/in+docs
Del: other reasons-- https://master.php.net/note/delete/75181
Reject -- https://master.php.net/note/reject/75181
Search -- https://master.php.net/manage/user-notes.php