- print_r: documentation ( source)
<?php
$services = [
'branch_delivery' => [
'name' => 'Branch Delivery',
'url' => 'info/trade-services/delivery',
'image' => 'assets/img/branch/icon-truck-delivery.png'
],
'timber_cutting' => [
'name' => 'Timber Cutting',
'url' => 'info/trade-services/timber-cutting',
'image' => 'assets/img/branch/icon-timber-cutting.png'
]
];
$options = [];
foreach ($services as $service => $data) {
$options[$service] = $data['name'];
}
print_r($options);