Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: determining if a number is between others

1. ## determining if a number is between others

how can i compare 2 dates with a week ago?

i just want to know if there is a way to determine whether 4 is in between 1-10 basically. is it possible?

poysyn

• Something like this?

PHP Code:
``` \$number = 4;\$min = 1;\$max = 10;if (\$number > \$min && \$number < \$max) {// do something}  ```
Just simple math there. :P

If not, perhaps you could be more specific about what it is your trying to accomplish?

• I actually use a week date in my coding.

PHP Code:
``` \$nextWeek = time() + (7 * 24 * 60 * 60); echo "This Week: (". date('Y-m-d') .")"; echo "Next Week: (". date('Y-m-d', \$nextWeek) .")";  ```

• As Zoic says you need to be more specific. Your question is far too vague

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•