What is the difference between $argv and $argc PHP ?

$argcThe number of arguments passed to script

$argvArray of arguments passed to script

To pass the information into the script from outside, help can be taken from the PHP CLI (Command line interface) method. Suppose addition of two numbers has to be passed to PHP then it can be passed like this on the command line:

Leave a Reply

Your email address will not be published. Required fields are marked *