Re: Display character 'x' times - Solved
| From: | Tjoumaidis Tasos | Date: | Tue, 19 Nov 2002 10:59:52 +0000 |
| Subject: | Re: Display character 'x' times - Solved | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125066@lists.php.net to get a copy of this message | ||
Great, That's exactly what i was looking for, thx to the other guys as well and sorry for not mentioning the whole problem which was that i wanted to pass the value to a variable.
Steel wrote:
Hi Tjoumaidis, Tuesday, November 19, 2002, 1:30:39 PM, I've got: TT> Hello to everybody, TT> I just want to display a character like D x times like DDD where x is a TT> $variable i get from the database i cannot make it work like it is on TT> perl (i don't even know if it is working the same way) and i can't find TT> a reference in the manual on php.net, maybe it's a silly question but i TT> am stuck at this moment. TT> Thx in advance. $str=str_repeat('D',$mult); This is the equivalent of Perl's "x" (repetition) operator, for eg. str_repeat("blah", 8) in PHP does the same thing as "blah" x 8 in Perl. Answer from PHP Manual. Comment by: bryantSPAMw@geocities.SPAM.com (25-Oct-2001 11:16)