Is there a function of some sort in PHP where I have the script and can make it loop X amount of times? Please help
for loop, 10 times for ($i=0; $i < 10; $i++) { echo $i; // prints 0123456789 } PHP: while loop 10 times $i=0; while ($i < 10) { echo $i; // prints 0123456789 $i++; } PHP:
I think you better start with reading some PHP tutorials. This is really a basic PHP statement that you need to understand before programming more advanced codes.
Habitually while you engrave code, you desire the same wedge of system to run over and over another time in a chain. in its place of totaling numerous roughly equal lines in a characters we can use loops to execute a mission like this.
wing answered your question already i think. + you can use foreach(){} read on php.net on how to use it.