I’m learning php now and the command array() is confusing me.
$opts = array(
'apple'=>array(
'banana'=>"GET",
'orange'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n"
)
);
I tried to echo opts, but the output was simply the word "ARRAY". I wonder what happened and how was $opts supposed to look like?
>Solution :
use var_dump($array); or print_r($array) instead of echo
https://www.php.net/manual/en/function.var-dump.php