array([details] => Array([0] => Array( [name] => 454 [location] => 4) [2] => Array([name] => 454 [location] => 5)))

I have array details with two sub arrays [0] and [2]

how to convert and order [2] to [1]
array([details] => Array([0] => Array( [name] => 454 [location] => 4) [1] => Array([name] => 454 [location] => 5)))

any body help me

Member Avatar for diafol
$details = array_values($details);

Excellent you saved my lot of time
very thanx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.