Salut J'ai écrit un code de test comme ci-dessous.PHP Array Clé & valeur Question
<?php
$url = 'http://localhost/events/result/cn_index.php?login';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);
?>
Sortie
Array ([scheme] => http [host] => localhost [path] => /events/result/cn_index.php [query] => login) /events/result/cn_index.php
Maintenant, j'inséré la ligne ci-dessous
echo array[query]; // I want to echo 'login', but failed.
Comment obtenir la valeur de 'login'?
@SilentGhost, ça marche bien. Je vous remercie. –