Re: [PHP] Is there a replicate function in PHP

2002-06-21 Thread Neil Freeman

echo str_repeat(*, 50);

Don wrote:
 **
 This Message Was Virus Checked With : SAVI 3.58 May 2002 
 Last Updated 14th June 2002
 **
 
 Hi,
 
 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);
 
 Thanks,
 Don


-- 

Work: [EMAIL PROTECTED]
Home: [EMAIL PROTECTED]

Web:  www.curvedvision.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Is there a replicate function in PHP

2002-06-21 Thread Lazor, Ed

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




RE: [PHP] Is there a replicate function in PHP

2002-06-21 Thread phpsurf

have look at the function 'str_pad'
http://www.php.net/manual/en/function.str-pad.php


 -Original Message-
 From: Lazor, Ed [mailto:[EMAIL PROTECTED]]
 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php