note 96004 deleted from function.empty by danbrown
| From: | danbrown@php.net | Date: | Tue, 02 Feb 2010 15:57:09 +0000 |
| Subject: | note 96004 deleted from function.empty by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165595@lists.php.net to get a copy of this message | ||
Note Submitter: Ap.Muthu
----
Some programming languages have the ability to create variables with a replicating string/char as
it's contents. For example:
$space5 = space(5);
I do not see any equivalent in PHP.
function replicatestr($numsize, $padchar) {
$zerostr = "";
while ($numsize) {
$zerostr .= $padchar; $numsize--;
}
return $zerostr;
}