note 11198 deleted from function.count by philip
| From: | philip@php.net | Date: | Fri, 13 Dec 2002 00:24:07 +0000 |
| Subject: | note 11198 deleted from function.count by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40832@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;
}