natsu Posted November 17, 2011 Share Posted November 17, 2011 Using a for loop counting from 0 to 9, I need to make this into a table. Making sure the table is 100% of the page. Any sort of help is appreciated. Thank you 0 1 2 3 4 5 6 7 8 9 Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/ Share on other sites More sharing options...
xyph Posted November 17, 2011 Share Posted November 17, 2011 Homework? Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289065 Share on other sites More sharing options...
natsu Posted November 17, 2011 Author Share Posted November 17, 2011 Not really, but me and my buddy are trying to figure this out and were not able to do it. Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289076 Share on other sites More sharing options...
xyph Posted November 17, 2011 Share Posted November 17, 2011 Not really? Why lie? The requirements sound more like they were given by a teacher than a developer. Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289079 Share on other sites More sharing options...
natsu Posted November 17, 2011 Author Share Posted November 17, 2011 I'm not lying. My freind told me he needs to do this, I am not sure if it is his homework or not lol, probebly is Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289084 Share on other sites More sharing options...
MasterACE14 Posted November 17, 2011 Share Posted November 17, 2011 For loop Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289137 Share on other sites More sharing options...
PFMaBiSmAd Posted November 17, 2011 Share Posted November 17, 2011 When you tried this, exactly where did you get stuck? At getting a for(){} loop to produce those values or outputting the values in HTML that would produce a table? Edit: Or styling the table so that it has 100% width? Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289140 Share on other sites More sharing options...
natsu Posted November 17, 2011 Author Share Posted November 17, 2011 Trying to get 2 per line and into a html table what I have so far <?php for ($i = 0; $i <= 9; $i++) { echo "$i  "; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289142 Share on other sites More sharing options...
natsu Posted November 18, 2011 Author Share Posted November 18, 2011 I solved this. Thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/251330-for-loop-on-a-table/#findComment-1289160 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.