My problem was how I was handling this in a session (a single quote was the thorn in my side). I am adding items to a session array based on URL GET's (example:
$_SESSION and session_register are not meant to be used together.
The new style would be more like so...
session_start();
if (!$PHPSESSID) {
$_SESSION["fruits"]=array();
}
if (!isset($_SESSION["fruits"])) {
$_SESSION["fruits"]=array();
}
if (isset($_GET["addfruit"])) {
$_SESSION["fruits"][]=$_GET["addfruit"];
}
Hope that helps.
-Rob
(and the convention is to use the quotes in those array indices, I believe you can do single or double... sometimes you can get away with not using them, but on upgrades or platform switches your results may go wacky)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.