MrXander Posted February 24, 2008 Share Posted February 24, 2008 Hi, Could someone point me in the way of a tutorial or code samples of how to make a list in php of one to fifty? By that, I don't mean a numerical list, I mean actually: One Two Three etc Any help would be appreciated. Thank you. Link to comment https://forums.phpfreaks.com/topic/92662-making-a-list/ Share on other sites More sharing options...
drisate Posted February 24, 2008 Share Posted February 24, 2008 Theres no build in fonction to turn a number into an alpha number ... so your gona have to make a function and a loop <?php function alpha($nb) { if ($nb=="1"){return "One";} [..] } $i = 1; while ($i <= 50) { echo alpha($i++); } ?> Link to comment https://forums.phpfreaks.com/topic/92662-making-a-list/#findComment-474867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.