Re: argv
| From: | Andrey Hristov | Date: | Fri, 23 Nov 2001 17:08:38 +0000 |
| Subject: | Re: argv | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75591@lists.php.net to get a copy of this message | ||
var_dump($argv);
$argv is an array. Don't expect if you coded in C that this is pointer to the first so you
possibly want to do echo of the first in
the array.
instead do :
foreach($argv as $param_name => $param_value){
// do your stuff here
}
Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "PACKER, Steffan" <PACKERS@AISL.UK.COM>
To: <php-general@lists.php.net>
Sent: Friday, November 23, 2001 7:02 PM
Subject: [PHP] argv
> the $argv is meant to contain all the arguments sent to the script. I need
> to get access to these but when I try to access them I can't!
> if I just use echo($argv) the only output is 'Array'
>
> All I am expecting to find for the purpose of my script is a five letter
> code, not a name/value pair.
>
> Can anyone help?
>
> Thanks,
> Steffan
>
>
> ****************************************************************************
> DISCLAIMER
>
> Any opinions expressed in this email are those of the individual
> and not necessarily the company. This email and any files
> transmitted with it, including replies and forwarded copies (which
> may contain alterations) subsequently transmitted from the
> Company, are confidential and solely for the use of the intended
> recipient. It may contain material protected by attorney-client
> privilege. If you are not the intended recipient or the person
> responsible for delivering to the intended recipient, be advised
> that you have received this email in error and that any use is
> strictly prohibited.
>
> If you have received this email in error please notify the Network
> Manager by telephone on +44 (0) 870 243 2431.
>
> Please then delete this email and destroy any copies of it.
> This email has been swept for viruses before leaving our system.
>
> Admiral Insurance Services Limited, Cardiff CF10 3AZ
> ****************************************************************************
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Scanning Service. For further information visit
> http://www.messagelabs.com/stats.asp
>