Hello I am working on a site that uses expedias api. Basically I get a number of people per room, and I want to echo out a little man image for each person. So if I have occupancy of 5 for example and I need to echo 5 tags with the little man as a src. Any idea how to do this??
Well let's say you have the amount of people stored in a variable.
$occupancy = 5;
You can then plug in that number into a for loop, and have the program cycle through that many times.
for($n = 0; $n < $occupancy; $n++) {
// Disco
}
You can read more about control structures here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With