Welcome to WebmasterWorld Guest from 50.16.126.107

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Looping/Repeating part of a script

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

Junior Member

10+ Year Member

joined:Jan 19, 2003
posts:63
votes: 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!

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

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12547
votes: 2


You might want to use a
for
loop. You are referring to what is called a Control Structure [php.net].
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members