note 32494 added to function.getopt
| From: | csnyder at rack1 dot php dot net | Date: | Thu, 29 May 2003 01:59:01 +0000 |
| Subject: | note 32494 added to function.getopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49232@lists.php.net to get a copy of this message | ||
/me slaps forehead.
You could just test for isset($options['e']), which would return TRUE even though
$options['e'] was FALSE.
#!/usr/local/bin/php
<?php
$options = getopt("abcdef");
if (isset($options['e'])) print "I took e!";
?>
----
Manual Page -- http://www.php.net/manual/en/function.getopt.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32494
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32494&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32494&report=yes