3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $brin = 'Gynzy'; $salesorderid = 2562; $aantal = 4; $product_id = 45; // $array_product [$i]["id"]= $row_product->id; // $array_product [$i]["name"]= $row_product->name; // $i++; $hallo = [ 'brin' => $brin, 'salesorderid' => $salesorderid ]; $hallo['productlines'] = ['quantity' => 5] ; $hallo['productlines'] = ['quantity' => $aantal] ; print_r ($hallo); ?>
based on 0qYJX
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
Array ( [brin] => Gynzy [salesorderid] => 2562 [productlines] => Array ( [quantity] => 4 ) )