I have the array in PHP 7:
Array ( [0] => 'Param1' [1] => "Value1" )
How can I get 'Param1' and "Value1" values?
Thank you in advance.
to access array values by key you'd do:
<?php
$array = ['product_id' => 100, 'product_name' => 'name'];
//basic
$firstParam = $array[$keyValue]
//e.g.
$id = $options['product_id'];
//var_dumping the id will return 100;
If your array's name is array
, then:
echo $array[0]; //Param1
echo $array[1]; //Value1