Mon var_dump m'affiche le tableau entier alors que je veux seulement affiché la 4ème position c'est à dire "4.0"
quelqu'un peut-il m'aider svp
$tableau = [23.0, 2.0, 1.0, 4.0, 5.2, 4.0, 5.2];
function chercherPosition (array $tableau): float {
return $tableau[3];
}
$f = chercherPosition([23.0, 2.0, 1.0, 4.0, 5.2, 4.0, 5.2]);
var_dump($f);