PHP code example of eden / cookie

1. Go to this page and download the library: Download eden/cookie library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eden / cookie example snippets


$cookie['me']    = array('name' => 'John', 'age' => 31);
$cookie['you']    = array('name' => 'Jane', 'age' => 28);
$cookie['him']    = array('name' => 'Jack', 'age' => 35);

foreach($cookie as $key => $value) {
	echo $value['name'];
}

eden('cookie')->get(*string|null $key);

eden('cookie')->setData(array('foo' => 'bar'));

eden('cookie')->setSecureData(*array $data, int $expires, string $path, string|null $domain);

eden('cookie')->setSecureData(array('foo' => 'bar'));