Assigning command line vars in script

From: Date: Tue, 18 Nov 2003 19:14:09 +0000
Subject: Assigning command line vars in script
Groups: php.general 
Request: Send a blank email to php-general+get-170140@lists.php.net to get a copy of this message
Does this look like a good way to retrieve command line variables and assign them in a script, or am I reinventing something that is already in place??? for ($i = 1; $i < $argc; $i = $i + 2) { $var = str_replace("-", "", $argv[$i]); $$var = $argv[$i+1]; } Thanks! -Shawn

« previous php.general (#170140) next »