Unique entries in an array

后端 未结 4 1882
小蘑菇
小蘑菇 2021-01-26 08:43

I have the following that stores the previous 10 URL\'s into a session:

function curPageURL() {
 $pageURL = \'http\';
 if ($_SERVER[\"HTTPS\"] == \"on\") {$pageU         


        
4条回答
  •  无人及你
    2021-01-26 09:15

    if(!in_array($CurrentPage, $_SESSION['pages']) {
        $_SESSION['pages'][] = $CurrentPage;
    }
    

提交回复
热议问题