I just did that tonight.
Lookup the predefined variables in the manual.
$argc gives a count of the arguments
$argv is an array of the arguments
Ex:
php -q myscript.php Apple Orange
$argc == 3
$argv[0] == 'php -q myscript.php' or something like that
$argv[1] == 'Apple'
$argv[2] == 'Orange'
-Ja
hi all,
i want to know how i can feed a parameter into a php script in commandline?
eg.
php getdata.php apple orange
so, i want to get use of "apple" and "orange"...
any help pls!
jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
hi all,
i want to know how i can feed a parameter into a php script in commandline?
eg.
php getdata.php apple orange
so, i want to get use of "apple" and "orange"...
any help pls!
jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
3 matches
Mail list logo