Bill
asked on
PHP Symbol Meaning
I have a question which is probably pretty basic to most PHP programmers. What is the => symbol for in PHP? For example if I have an array cookie set up:
I can run this code and get all the cookie array values:
But if I run this it will give me the of the current cookie array names and their respective values:
So clearly the => has some sort of special meaning but I am not sure what it is. I was trying to google it but search engines and web sites do NOT like the => symbol for searching.
setcookie ("FBPoolCookie[userID]",$row['sqlUserID'],time()-3600);
setcookie ("FBPoolCookie[userTeamID]",$row['sqlUserTeamID'],time()-3600);
I can run this code and get all the cookie array values:
foreach($_COOKIE["FBPoolCookie"] as $tempVar) {
echo($tempVar . "<br />");
}
But if I run this it will give me the of the current cookie array names and their respective values:
foreach($_COOKIE["FBPoolCookie"] as $tempVar => $value) {
echo($tempVar . $value . "<br />");
}
So clearly the => has some sort of special meaning but I am not sure what it is. I was trying to google it but search engines and web sites do NOT like the => symbol for searching.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER