Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Below is the code . i want do it using only one for loop.
Ganesh Parate
Dec 8 2017 2:23 AM
211
Reply
Below is the code . i want do it using only one for loop in PHP. Please help me how can i achieve it... Thanks
//Rewrite the code below so it would contain only one loop and only one iterational variable would be used.
$result = Array();
for ($x = 0; $x < 6; $x++){
for ($y = 0; $y < 6; $y++){
for ($z = 0; $z < 6; $z++){
$result[$x][$y][$z] = $x * $y * $z;
}
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Linq Dynamic query for getting dynamic list based on Id
Any Suggestions or comments on the following code please