嗨,我寫了如下的測試代碼。PHP Array Key&value問題
<?php
$url = 'http://localhost/events/result/cn_index.php?login';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);
?>
輸出
Array ([scheme] => http [host] => localhost [path] => /events/result/cn_index.php [query] => login) /events/result/cn_index.php
現在我插入下面
echo array[query]; // I want to echo 'login', but failed.
行如何獲得的 '登錄' 的價值?
@SilentGhost,它工作的很好。謝謝。 – 2010-05-04 14:12:13