php7.4 8.0

3 years ago

RomkaLTU

Code

$data = [
  'javaSecurityToken' => '',
  'merchantDetails' => ['merchantIdentification' => 99597368]
];

foreach($data['merchantDetails'] as $item) {
  echo $item['merchantIdentification'];
}

Output

PHP Warning:  Trying to access array offset on value of type int in phar:///Applications/Tinkerwell.app/Contents/Resources/tinkerwell/tinker.phar/index.php(206) : eval()'d code on line 3
Video course: PHP Package Development