I'm new to programming, I've been studying the PHP manual to better understand how the language works.
I have to do the following exercise: Print student names in uppercase in order of enrollment.
Here's my code:
$nome_alunos = array('andre' => 1 , 'paulo' =>5, 'fabio' => 2);
asort($nome_alunos);
strtoupper($nome_alunos);
foreach ($nome_alunos as $key => $value) {
echo "$key = $value\n";
I can not capitalize the names using strtoupper()
that are inside the array, I could only put it in order, I also read the PHP manual and did not find a function that helps me beyond the one described above. Can someone help me?