Between operator in PHP
Is there a between operator for php to compare a value with two values(maximum-mimimum) same time?
For example:
if( 1 <= $day => 31 ) ...
if( $day between 1 and 31 )...
I can write a function but I want to find the shortest way without manually functions.
function between($val, $min, $max){
if($val >= $min && $val <= $max) return true;
return false;
}
if(between($day, 1, 31)) ...
Similar entries
- PHP get page title function
- How to use custom function aliases in PHP
- How to hide / encrypt CCK Email field with JS against spammer
- PHP Block for Custom Role under Drupal 6
- Let your visitors run Drupal cron for you
- Simple Hello World Module for Drupal 6
- Sleep Function for JavaScript like PHP
- php
- Get top 100 words / keywords from a text with PHP
- Backup all MySQL databases automagicly with the PHP admin script
- Black-White theme for Notepad++ (for Programmers)
- Search in text files recursively with PHP - Grep
- Install Curl on PHP5 Webmin + Debian
- Magento admin login issue {{base_url}} is not recommended
- How to override php mail function to catch abuse / spammer
- Check password safety with JavaScript while typing
- What is difference between print_r and var_dump in PHP?
- web development tool Firebug for Firefox
- Mysql replace with regexp
- Fix swfupload fake flash player error

Post new comment