Hi all
I know how to sort an array but I dont know how to sort an array according to a value in the second array...
<?php
$array1 = array(
array('name'=>'01','number' => 1),
array('name'=>'07','number' => 7),
array('name'=>'05','number' => 5),
array('name'=>'06','number' => 6),
array('name'=>'02','number' => 2),
array('name'=>'03','number' => 3),
array('name'=>'11','number' => 11),
array('name'=>'08','number' => 8),
array('name'=>'09','number' => 9),
array('name'=>'10','number' => 10),
array('name'=>'04','number' => 4),
array('name'=>'12','number' => 12)
);
?>
this is the array 1...
i want to rearrange the arrays that are inside this $array1 according to the number in the second array...