Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Number Ranges, Need Help!!
Old 12-05-2005, 01:30 AM Number Ranges, Need Help!!
Skilled Talker

Posts: 70
Trades: 0
Does anyone know how to check if a numerical value is between two different numbers? I've been looking in the PHP manual and haven't found a function that checks number ranges.

Is this the correct way to do it?

PHP Code:
if($a >= && $a <= 4)
{
header("Location: pagea.php")};
else
{
header("Location: pageb.php")}; 
cerebro89 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-05-2005, 02:31 AM
Nahele's Avatar
Extreme Talker

Posts: 204
Trades: 1
Yes, but your syntax is off. You need to have your semicolon at the end of the statement and then the closing bracket for the if and else blocks...and this is a little bit nicer to read
PHP Code:
if($a >= && $a <= 4) {
header("Location: pagea.php");
} else {
header("Location: pageb.php");

__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Old 12-05-2005, 03:17 AM
Skilled Talker

Posts: 70
Trades: 0
thanks for your help
cerebro89 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Number Ranges, Need Help!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11240 seconds with 12 queries