Re: Print a char from a variable number

From: Date: Tue, 25 Jun 2002 16:25:21 +0000
Subject: Re: Print a char from a variable number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103803@lists.php.net to get a copy of this message
Yea !! It worked... I was looking for some thing like that !! Thank you very much ! Gus ----- Original Message ----- From: "John Holmes" <holmes072000@charter.net> To: <guslist@kerntec.net>; <php-general@lists.php.net> Sent: Tuesday, June 25, 2002 1:03 PM Subject: RE: [PHP] Print a char from a variable number > Why not use str_repeat()? > > www.php.net/str_repeat > > ---John Holmes... > > > -----Original Message----- > > From: guslist@kerntec.net [mailto:guslist@kerntec.net] > > Sent: Tuesday, June 25, 2002 11:45 AM > > To: php-general@lists.php.net > > Subject: [PHP] Print a char from a variable number > > > > Hello List, > > > > I want to do something that I think it is very simple but I can´t get > > working ! I´ve tryed fprint and works well but not with a random > number. > > printf("%'-6s", ""); > > Here I print the '-' char 6 times. > > > > In some where of my code a get a result from a math calculation and I > want > > to print this result as chars. Example: > > > > 10 - 7 = 3 > > I want to print the char '-' 3 times. > > 18 - 7 = 11 > > I want to print the char '-' 11 times. > > > > Can anyone help me ? > > > > Thank´s in advance, > > Gus > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#103803) next »