Can someone please give me some hints and explain me what I do wrong for that exercice (without giving the solution, as I want to understand and know what I do wrong).
// Créez un tableau avec les membres de votre famille ou amis
$tabAmis = array ();
array_push ($tabAmis, "Ami1");
array_push ($tabAmis, "Ami2");
array_push ($tabAmis, "Ami3");
array_push ($tabAmis, "Ami4");
array_push ($tabAmis, "Ami5");
array_push ($tabAmis, "ami6");
// Triez le tableau pour avoir les noms en ordre alphabétiques
// Aléatoirement, sélectionnez un gagnant !
$answer = substr($tabAmis, rand(0, strlen($tabAmis)-1), 1);
// Affichez le nom du gagnant en majuscule !
- It is say to use count so I added it but I don't know what to do with it.
- it is say to use sort alphabetically but I have no idea how to do that.
- for the answer, I use the code in the previous exercices (where you have to pick one letter of your name and try to change it to make it work with that exercice).
I guess all is wrong. But really I am kind of really lost.
Can someone help me please, by giving me hint of what is wrong, and what I do wrong?