Welcome to WebmasterWorld Guest from 54.157.222.62

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)

10+ Year Member



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)

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



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