Check on the value of using preg_match

  • (2 votes)
  • Written by 
  • Sunday, 12 April 2015 11:29

Check on the value (STRING) using preg_match

<?php
if (is_string($resolve)) {
    $resolve = ( preg_match("/false|no|off/i", $resolve) ) ? false : true;
}
522 Read Last modified on Sunday, 12 April 2015