Commonly with a shell script you need to pass arguments to the script. This is easily done using the built-in '$argv' array as show in the following example: #!/usr/local/bin/php -q <?php $first_name = $argv; $last_name = $argv; print("Hello, $first_name $last_name! How are you today?\n"); ?> So in the above script we're printing out the first two arguments to the script which would be called like this: [dbrogdon@artemis dbrogdon]$ scriptname.ph Darrell Brogdon Which would print out: Hello, Darrell Brogdon! How are you today? [dbrogdon@artemis dbrogdon]$
|incrementing radio button names and ids using php||5||37|
|Display different menus depending on if user is logged in or not||11||31|
|Could you point a way to form a view's combo based on Codeigniter's results?||4||18|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!