| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Account Closed Join Date: Oct 2005 Location: United Kingdom
Posts: 1,554
![]() ![]() ![]() ![]() | [HELP] If between X and X echo ? Hi Im having some trouble getting this to work. Iv got some numbers and need php to echo text if the varible is anything between these numbers. 20m | echo 1 10m - 20m | echo 2 5m - 10m | echo 3 8k - 1m | echo 4 i cant seem to figer out how this would work in php as the if($a > 100000 < 200000) doesnt work. anyone got any idea how to do this? Thanks in advance rep will be added. |
| |
| | #4 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Something like this possibly?: PHP Code: |
| |
| | #6 (permalink) |
| Senior Member Join Date: Jul 2005 Location: NJ
Posts: 1,219
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | btw, you can also use && for AND and also || for OR. you can also use parenthesis for order of operations like PHP Code:
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| |