homepage Welcome to WebmasterWorld Guest from 54.211.201.65
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Looping/Repeating part of a script
Schoolbag




msg:1285650
 7:59 pm on Dec 5, 2003 (gmt 0)

Hi,

Can someone point me in the right direction either for the logic or maybe the function, here's what Im trying to do.

I would like a script to run a particular function "X" times based on what a user inputs via a form. So,

(excuse the coding, Im just trying to show what Id like it to do, I will fix it up later)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
$numberoftimes=$_post["times"]

echo "first name";
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

How can I get it to print the echo line the $numberoftimes?

Any direction is appreciated.

thanks!

 

coopster




msg:1285651
 8:10 pm on Dec 5, 2003 (gmt 0)

You might want to use a
for loop. You are referring to what is called a Control Structure [php.net].
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved