$_session[] in the function PHP : how to add $_session[] in function


    function get_cart_list(){
    global $_SESSION['items'];
    
    
    if (isset($_SESSION['items'])) {
    foreach ($_SESSION['items'] as $key => $val){
    $gete = $key;
    $total = 0;
    include ('gc-cache-product.php');
      $jumlah_harga = ( $skupricenew ) * $val;
      $total += $jumlah_harga;
    include ($themeid."/content/part/cart/cart_list_item.php");
    }
    }
    
    
    }

syntax error, unexpected '[', expecting ',' or ';' in <b>/home/clients/xxx/html/website/template/shadows/gc-cart.php</b> on line 2


thank you