比方說,我有一個字符串我怎麼在刷新呼應一個一個數組在php中每次echo其他字符串?
session_start();
if(isset($_SESSION["names"])){
$_SESSION["names"] = $_SESSION["names"] + 1;
}
else{
$_SESSION["names"] = 1;
}
$names = array("Adrian","Bill","Mac","John");
echo $_SESSION["names"];
我的代碼是凌亂只是舉例。我需要呼應每次有新的名稱,但不是隨機的
@JohnBook如果我的答案滿足您的查詢,然後將其標記爲接受? –
新的stackoverflow是我標記它 –
@JohnBook http://stackoverflow.com/help/someone-answers –