0
I’m a beginner in programming, I’ve been studying the PHP manual to better understand how the language works.
I have to do the following exercise: Print students' names in upper case in order of enrollment.
This is 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’t capitalize on the names using strtoupper()
that are inside the array, I was only able to put in order, I also read the manual of PHP and did not find a function that helps me beyond the one described above. Can someone help me?
Thanks for the explanation was of great help to understand my mistake.
– Andre Viana