<?php $array = [ [16, 'News', 'News', 'News', 'News content'], [17, 'about-us', 'About us', 'About us', 'About us content'], ]; $result = []; foreach ($array as $row) { $result[array_shift($row)] = $row; } var_export($result);
You have javascript disabled. You will not be able to edit any code.