By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Printing elemenets 3x3 from 9 elements lists

P: 1
What is the easiest way to print 3rows with 3cols from 9 elements list ? I mean list = [ 1, 2, 3, 4, 5, 6, 7, 8, 9]
1 2 3
4 5 6
7 8 9
Jan 9 '16 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,397
loop counter against the array elements

For each > http://php.net/manual/en/control-structures.foreach.php

general For loop > http://php.net/manual/en/control-structures.for.php

Ways to handle Arrays > http://php.net/manual/en/language.types.array.php

However, I like this site better for some tutorials...
arrays> http://www.w3schools.com/php/func_array.asp

If you are asking for code, that's not allowed, please see the FAQ; however, if you already have PHP script written post it here (formatted using the [CODE/] tool please :) ) along with a clear explanation of what it's doing and someone here can help spot the issue.
Jan 9 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.