canabatz Posted December 23, 2011 Share Posted December 23, 2011 how can a get this result in for loop: 1 4 1 5 1 6 2 4 2 5 2 6 3 4 3 5 3 6 thanks Quote Link to comment Share on other sites More sharing options...
SergeiSS Posted December 23, 2011 Share Posted December 23, 2011 Did you try to write a code to solve this? Maybe 5-7 lines? Quote Link to comment Share on other sites More sharing options...
canabatz Posted December 23, 2011 Author Share Posted December 23, 2011 im little bit sick , it was hard for me to think well , any way thanks for th push for ($i=1; $i<=3; $i++) { for ($z=4; $z<=6; $z++) { echo $i; echo $z."<br>"; } } Quote Link to comment Share on other sites More sharing options...
SergeiSS Posted December 23, 2011 Share Posted December 23, 2011 If you remove empty strings and combine echos.... You'll get exactly 7 lines Quote Link to comment Share on other sites More sharing options...
canabatz Posted December 23, 2011 Author Share Posted December 23, 2011 Exactly Thanks SergeiSS Quote Link to comment 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.