kokomjolk Posted August 1, 2008 Share Posted August 1, 2008 Hello from Maine! I am trying to create a sign that will have the numbers 1-200,000 typed out with spaces in between and found an answer using php that had me plugging this in: <?php $lowestnum = 1; $highestnum = 200000; for($i=$lowestnum; $i<=$highestnum; $i++){ echo "$i, "; } ?> I wouldn't be surprised if it was my own incompetence getting in the way, but I am having a tough time making this happen. Any help? Besides my eternal gratitude I could send a funny video of one of my friends wiping out while covering a news story as thanks. Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 1, 2008 Share Posted August 1, 2008 It would probably help if you told us what it was doing that was not correct, because it works for me (except for the final ", " that would need to be trimmed off.) Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605516 Share on other sites More sharing options...
.josh Posted August 1, 2008 Share Posted August 1, 2008 If you wanted the numbers with just spaces then take out the comma in "$i, " also were you wanting to somehow further format it as in make columns/rows? Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605520 Share on other sites More sharing options...
kokomjolk Posted August 1, 2008 Author Share Posted August 1, 2008 wow, thanks for the quick responses - i am a true neophyte when it comes to all this, (my training wheels still have visible tread) is there any way to walk me through this? i realize you didn't wake up this morning wondering how you could help a complete stranger, so anything would be very much appreciated thanks again Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605528 Share on other sites More sharing options...
kokomjolk Posted August 1, 2008 Author Share Posted August 1, 2008 and what i am trying to accomplish is having all the numbers in order with a space in between them, no needs for rows or columns as they will be reformatted to show how many people have been helped by a local charity Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605529 Share on other sites More sharing options...
.josh Posted August 1, 2008 Share Posted August 1, 2008 Okay well if you want just the numbers with a space between them just take out the comma <?php $lowestnum = 1; $highestnum = 200000; for($i=$lowestnum; $i<=$highestnum; $i++){ echo "$i "; } ?> Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605531 Share on other sites More sharing options...
kokomjolk Posted August 1, 2008 Author Share Posted August 1, 2008 so with this refined version, all i do now is save a webpage, open it with notepad, and replace the existing code with this? Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605533 Share on other sites More sharing options...
.josh Posted August 1, 2008 Share Posted August 1, 2008 well..yeah but it has to have a somepage.php extension and I am assuming that it's being run on a computer (server, whatever) that has server software like apache installed, as well as the php parser.. Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605539 Share on other sites More sharing options...
kokomjolk Posted August 1, 2008 Author Share Posted August 1, 2008 we have apache but i am not sure of a php parser (i'd be rolling my eyes too if i were you) Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605557 Share on other sites More sharing options...
The Little Guy Posted August 1, 2008 Share Posted August 1, 2008 we have apache but i am not sure of a php parser (i'd be rolling my eyes too if i were you) If you can run php on your computer/server you have a php parser. Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605558 Share on other sites More sharing options...
kokomjolk Posted August 1, 2008 Author Share Posted August 1, 2008 thanks for all your help, i think i'm too minor leagues to be playing here, but as promised here is my friend and his stealth coverage of a press conference Link to comment https://forums.phpfreaks.com/topic/117726-php-integer-question/#findComment-605560 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.