lilmer Posted February 15, 2013 Share Posted February 15, 2013 I have a code here: $length = 90; for ($i=65; $i<=$lenght; $i++){ $out .= "<th>".chr($i)."</th>"; } It output from A-Z; but when I add value on $length; the next output is opening bracket " [ ". What I want is A -Z AA, AB etc. like spreadsheet do. or maybe someone can give me resources on how to create Google like Spreadsheet using PHP js. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/274509-php-loop-alphabetically-like-excel-sheet/ Share on other sites More sharing options...
kicken Posted February 15, 2013 Share Posted February 15, 2013 (edited) for ($i='a',$x=0; $x<100; $x++,$i++){ var_dump($i); } Edited February 15, 2013 by kicken Quote Link to comment https://forums.phpfreaks.com/topic/274509-php-loop-alphabetically-like-excel-sheet/#findComment-1412575 Share on other sites More sharing options...
lilmer Posted February 15, 2013 Author Share Posted February 15, 2013 OMG! that was amazing!. . another knowledge was given.. THANK you! Quote Link to comment https://forums.phpfreaks.com/topic/274509-php-loop-alphabetically-like-excel-sheet/#findComment-1412580 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.