RE: [PHP] Is there a replicate function in PHP
| From: | phpsurf | Date: | Fri, 21 Jun 2002 16:06:19 +0000 |
| Subject: | RE: [PHP] Is there a replicate function in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103299@lists.php.net to get a copy of this message | ||
have look at the function 'str_pad'
http://www.php.net/manual/en/function.str-pad.php
> -----Original Message-----
> From: Lazor, Ed [mailto:ELazor@providence.org]
> Sent: vendredi 21 juin 2002 17:57
> To: 'Don'; php list
> Subject: RE: [PHP] Is there a replicate function in PHP
>
>
> I don't know if the function exists, but it should be easy to create.
> Something like this:
>
> function replicate($Repeat, $RepeatCount)
> {
> $Results = "";
>
> if ( ($RepeatCount < 1) or ($Repeat == "") )
> return false;
>
> for ($i=0; $i < $RepeatCount;$i++)
> $Results .= $Repeat;
>
> return $Results;
> }
>
>
>
> > -----Original Message-----
> > I'd like to print one or more specific characters many times.
> > For example, let's say I'd like to display the '*' 50 times
> > on one line. Is there a function that will do this? Something like:
> >
> > ? replicate('*',50);
>
> ******************************************************************
> **********
> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law. If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message. If you have received this message in error, please immediately
> advise the sender by reply email and delete the message. Thank you very
> much.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif