as i have array like

  $array[selfintro,1]=[selfintroduction]]
  $array[experience,2]=[Experience]
  $array[education,3] =[Education]
  $array[skills,4]= [Skills]

  $model[]=[Education,selfintroduction,accomplishment]

i wanna sort "array" using "model" array so it would be like,

$array[education,3] =[Education]
$array[selfintro,1]=[selfintroduction]]

i tried to sort it using this technique,

$sorted=array_intersect($model,$array);`

it do not sort it but when i do it using normal array ahving index value then it give me its result but by using $array its index value in string and int formamt not working for me ?

hopes for your suggestions,

EDITED::

i am populating array from mysqldb and this array contain data like i mentioned above

for loop
{
$array[$templateName.','.$inc]=$V_temptag;
}

after creating this array i sort it using another array that is $model

$sorted=array_intersect($model,$array);
print_r($sorted);
share|improve this question
strange way to define an array ? also Question title is ambiguous – diEcho Aug 9 '12 at 6:37
You want to sort it or rearrange it customly? And what is that code you provided? – Dainis Abols Aug 9 '12 at 6:38
Please post the right php code. – xdazz Aug 9 '12 at 6:42
possible duplicate of Sorting a php array of arrays by custom order – salathe Aug 9 '12 at 6:45
@all perhaps code have error but its index and values are same i am just telling you what i want to do and whats actually doing you all people are well aware of declaring array hopes for your suggestions – Syed Raza Aug 9 '12 at 6:50
show 3 more comments
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.