Current location: Hot Scripts Forums » Programming Languages » PHP » Perl code : print "." x 20; - How to do it with PHP ?


Perl code : print "." x 20; - How to do it with PHP ?

Reply
  #1 (permalink)  
Old 07-01-03, 10:29 PM
kevin kevin is offline
Newbie Coder
 
Join Date: Jun 2003
Location: USA
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Perl code : print "." x 20; - How to do it with PHP ?

Hello !

This is a Perl code :
Code:
print "."  x 20 ;
it will print 20 dot to the browser like below
Code:
...................
Can you print like that with PHP ? How? Please help

Thanks !
Reply With Quote
  #2 (permalink)  
Old 07-02-03, 01:08 AM
BdSBB BdSBB is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Georgetown, TX
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
print str_pad('.', 20);
__________________
-- BdSBB

Last edited by BdSBB; 07-02-03 at 02:18 AM.
Reply With Quote
  #3 (permalink)  
Old 07-04-03, 04:29 AM
mic dynamic mic dynamic is offline
New Member
 
Join Date: Jul 2003
Location: Switzerland
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

you can use also FOR stuff.

PHP Code:

<? 


$x
=20;
for (
$i=0$i<$x$i++)

echo 
"."

?>
regards
mic
__________________
PHP Code:

<? Echo "PHP rocks!"?>

http://groups.yahoo.com/group/php_king/
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP code to edit a text file mdhall Script Requests 12 12-23-10 04:03 AM
PHPCode.Org - PHP Code Submission Database Dana General Advertisements 8 11-29-06 09:04 PM
protecting code in PHP ckb PHP 12 01-02-04 08:53 AM
[Tutorial] Hello World Antitrust PHP 10 10-14-03 01:27 PM
Bookings/Availability PHP or Perl Script Mista Mike Script Requests 1 08-20-03 08:37 AM


All times are GMT -5. The time now is 09:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.