I'm working on a little project based on codeigniter, I'm not a php developer and this is my problem:
foreach ($checkeds['id_iscritti'] as $checked){
$iscritto = $this->pellegrinaggio_iscritti_m->get_iscritto($checked);
$utente = $this->utenti_m->get_utente($iscritto[0]->id_utente);
echo ("utente: <pre> ");var_dump($utente);echo (" </pre> \n\n");
}
this is the code, it basically generate an associative array
and this is what i obtain from the var_dump:
array(1) { [0]=>
object(stdClass)#38 (27) {
["id"]=>
string(3) "254"
["nome"]=>
string(13) "Padre EDUARDO"
["cognome"]=>
string(9) "ANATRELLA"
}
}
utente:
array(1) {
[0]=>
object(stdClass)#37 (27) {
["id"]=>
string(3) "338"
["nome"]=>
string(4) "ELSA"
["cognome"]=>
string(5) "PAONE"
}
}
How can i sort the array $utenti by the index "nome"? I've spent some hours, to understand how this kind of array works, without any results, can you help me?