$value){ return $arr[$value] } } else{ return $arr[$value]; } } } // Example usage: $array = [1, 2, 3, 4, 5]; $rotated = rotateLeft($array, 2); print_r($rotated); // Output: [3, 4, 5, 1, 2] function combineAndUnique($array1, $array2) { $arr = []; foreach($array1 as $count){ if(!$arr[$count]){ return $arr[$count]; } foreach($array2 as $count2){ if(!$arr[$count2]){ return $arr[$count2]; } } } return $arr; } $array1 = [1, 2, 3, 4]; $array2 = [3, 4, 5, 6]; print_r(combineAndUnique($array1, $array2)); // expected answer: [1, 2, 3, 4, 5, 6] // Q3: Find the second highest salary from the employees table. Select Max(salary) from employees orderby salary desc; // Q4: Find the top 3 highest selling products from the sales table. Select count(product_id as total_product) from sales group by quantity_sold orderby total_product DESC limit 3 Q5: Find unique numbers. let numbers = [1, 2, 2, 3, 4, 4, 5, 5, 5]; var num = []; foreach(numbers as number){ if(!num[number]){ return num[number] }else{ return num[number] } }