![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hello everyone - I have two scalars assigned as numerical values, and I want to print the first, all integers in between, and then the last. In perl I would say something like this: foreach ($num1 .. $num2) { print $_; } How do I print all the values between two values in php? I would appreciate any help you can give! Thanks, Matt | |||
|
| | #2 | ||
| for($i = num1; i <= $num2; $i++) echo $i; Rafael Cotta "Matt Schroeder" <wnawombat41@comcast.net> escreveu na mensagem news:AqnQa.55052$H17.18454@sccrnsc02... > Hello everyone - > > I have two scalars assigned as numerical values, and I want to print the > first, all integers in between, and then the last. In perl I would say > something like this: > > foreach ($num1 .. $num2) { > print $_; > } > > How do I print all the values between two values in php? I would appreciate > any help you can give! > > Thanks, > Matt > > | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: foreach, functions |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Char functions - help !!! | Andy Yeo | PHP | 3 | 07-01-2007 3:36 PM |
| C++ question: How to change base class members in functions that don't know about the derived class | Shavais | Software Programming | 3 | 06-12-2007 10:23 PM |
| PHP5 Static functions called through __call() that don't exist... yet | Jared Farrish | Pear | 2 | 05-20-2007 6:34 PM |
| Featured Websites | ||||
|