note 92701 deleted from function.intval by danbrown

From: Date: Tue, 04 Aug 2009 17:45:08 +0000
Subject: note 92701 deleted from function.intval by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159102@lists.php.net to get a copy of this message
Note Submitter: test at hotmail dot com ---- <?php function my_intval($number){ $number = iif(!$number,0,$number); preg_match('/[0-9]+/', $number, $matches); return $matches[0]; } echo my_intval('example 1'); // return 1 ?>

« previous php.notes (#159102) next »