note 11197 deleted from function.sizeof by jimw

From: Date: Wed, 03 Apr 2002 18:56:57 +0000
Subject: note 11197 deleted from function.sizeof by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28555@lists.php.net to get a copy of this message
when used as a shell script, sizeof nor count seem to work. I solved it like this: // jump to last index end($argv); // get the key and put it in $index $index = key($argv); // check the value of $index if($index < 2 || $index > 2) { print "Need 2 args! No more, no less\n"; exit; }

« previous php.notes (#28555) next »