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! 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 for ($i='a',$x=0; $x<100; $x++,$i++){ var_dump($i); } 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! 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
Archived
This topic is now archived and is closed to further replies.