Re: Display character 'x' times
| From: | Tularis | Date: | Tue, 19 Nov 2002 10:47:54 +0000 |
| Subject: | Re: Display character 'x' times | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125059@lists.php.net to get a copy of this message | ||
Tjoumaidis Tasos wrote:
Hello to everybody, I just want to display a character like D x times like DDD where x is a $variable i get from the database i cannot make it work like it is on perl (i don't even know if it is working the same way) and i can't find a reference in the manual on php.net, maybe it's a silly question but i am stuck at this moment. Thx in advance. there propably is a faster way, but you can use this:$max = the amount of times you want it to show :) //eg 6 would give dddddd while($i <= $max){ echo 'd'; //or any character you want $i++; }