I think you can use array_reduce() function. For example:

   $multi= array(0 => array('t1' => 'test1'),1 => array('t2' => 'test2'),2 => array('t3' => 'test3'),3 => array('t4' => 'test4'));
   $single= array_reduce($multi, 'array_merge', array());
   print_r($single);  //Outputs the reduced aray
Answer from Azeez Kallayi on Stack Overflow
🌐
W3Docs
w3docs.com › php
Convert multidimensional array into single array
In this example, the ... (splat) operator is used to spread the sub-arrays of $multi_dimensional_array as separate arguments to the array_merge function, which concatenates them into a single array.
🌐
GitHub
gist.github.com › SeanCannon › 6585889
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array. · GitHub
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array. - array_flatten.php
🌐
IQCode
iqcode.com › code › php › convert-multidimensional-array-into-single-dimension-php
convert multidimensional array into single dimension php Code Example
November 14, 2021 - $arrayMult = [ ['a','b'] , ['c', 'd'] ]; $arraySingle = call_user_func_array('array_merge', $arrayMult); // $arraySingle is now = ['a','b', ...
🌐
GeeksforGeeks
geeksforgeeks.org › php › how-to-flatten-multidimentional-array-in-php
How to Flatten Multidimentional Array in PHP ? - GeeksforGeeks
July 11, 2024 - PHP's array_walk_recursive() function provides a straightforward way to flatten a multidimensional array. This function applies a user-defined callback function to each element of the array recursively.
🌐
SitePoint
sitepoint.com › php
Convert Multidimensional array to single array - PHP - SitePoint Forums | Web Development & Design Community
April 26, 2014 - $newArray = array(); foreach($multi as $array) { foreach($array as $k=>$v) { $newArray[$k] = $v; } } This loops through your multidimensional array and stores the results in the new array variable $newArray.
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 26375527 › convert-multidimensional-array-to-single-dimension
php - convert multidimensional array to single dimension - Stack Overflow
$people = array ( "1" => array ( "0" => "greenspan", "1" => 32 ), "2" => array ( "0" => "doe", "1" => 52 ) ); $new_people = array(); while(list($person, $person_array) = each($people)) { while(list($person_attribute, $value) = each($person_array)) ...
🌐
FlatCoding
flatcoding.com › home › php multidimensional arrays: data manipulation
PHP Multidimensional Arrays: Data Manipulation - FlatCoding
April 15, 2025 - In this example, we created a nested multidimensional array called $employees that contains three arrays, each representing an employee. Each employee array contains four key-value pairs, including a projects key, which contains an array of ...
🌐
Position Is Everything
positioniseverything.net › home › php flatten array: here are two methods to perfect them
PHP Flatten Array: Multidimensional Into Single Dimensional Arrays
December 29, 2025 - Flattening an array enables it to store a single element at each of its indexes instead of another array. By converting PHP multiple array in a multidimensional array to a single-dimensional array, you can eliminate the feature of its elements to be arrays and hold subarrays within.
🌐
Stack Overflow
stackoverflow.com › questions › 48682673 › convert-multidimensional-array-into-single-array-with-key-and-values
php - Convert multidimensional array into single array with key and values? - Stack Overflow
You already have it in the format you want, they are just in different ways of displaying arrays, except that your arrays are indexed by keys, if you really want to unindex it use this $newArray = array_values($array) ... foreach ($array as ...
🌐
CodeSignal
codesignal.com › learn › courses › multidimensional-arrays-and-their-traversal-in-php › lessons › multidimensional-arrays-and-their-traversal-in-php
Multidimensional Arrays and Their Traversal in PHP
By using the indices [1][0], you ... 1M+ users who develop and demonstrate their skills on CodeSignalStart learning today! ... <?php $array = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; // Accessing an element echo $array[1][0]; // Outputs: 4 ?>...