<?php $data = [ ['space', 'Venus', 'NASA', 'apple'], ['link1', 'link2', 'link3', 'link4'], ]; // Convert the multiple dimensional array to avsingle $merged = array_combine(...$data); // Sort by key uksort($merged, fn($a, $b) => strcasecmp($a, $b)); var_dump($merged); // If it needs to be converted back to a multiple dimension array $data = [ array_keys($merged), array_values($merged), ]; var_dump($data);
You have javascript disabled. You will not be able to edit any code.