0
How to output like this in hp
2,2,3,3,4,4
4 Respuestas
+ 3
Umm, isn't it pretty simple if you completed php looping course from Sololearn?
Make a counter variable that starts from 2 as you want to start printing from 2.
$counter = 2;
//now we will run a while loop here, you can use for loop if you want.
//Condition is less than 5 because you want to print it till 4 only.
while($counter < 5){
echo $counter.",".$counter;
$counter++;
}
+ 2
Please elaborate more on the question.
Do you want to print it using looping structures? Or just simply print it?
0
With looping in php
Thanks
0
Thanks