RE: [PHP] the files I'm working with

From: Date: Fri, 04 Oct 2002 13:35:37 +0000
Subject: RE: [PHP] the files I'm working with
Groups: php.general 
Request: Send a blank email to php-general+get-118880@lists.php.net to get a copy of this message
Hi Marek, > safe enough would be to put this at the begining > if(!ereg('^[0-9]+$',$song) { > die('Sorry...') > } Sure, but why incur the expense of using the ereg() parser? If you're only ever going to be testing whether $song is a number or not, use http://php.net/is-numeric. Cheers Jon

« previous php.general (#118880) next »