This snippet shows how you can easily save information to a cookie. More informatiom about cookies can be found on the site.
Add an Item to an Array
<?php
// this declares and fills the array
$arrFood = array("Apples", "Oranges", "Pears", "Grapes");
// use the brackets empty to add an item
$arrFood[ ] = "Steak";
// now Steak has been added to the array
?>
To use the code above, click and drag your mouse
over the code to highlight it. Then right click on the highlighted
code and click "Copy." Now you may paste it into your code editor.
|