php - How to create a nested loop and display the result in 3 columns?

Solution:
The outer loop is for rows, the inner loop is for columns. So you should print<br/>
in the outer loop. And since you want$x
printed in each column, you need to print that in the inner loop.
for ($x = 0; $x < 4; $x++) {
for($y = 0; $y < 3; $y++){
echo "$x($y) ";
}
echo "<br/>";
}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to a member function store() on null
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.