Link to home
Start Free TrialLog in
Avatar of Bill
BillFlag for United States of America

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:
setcookie ("FBPoolCookie[userID]",$row['sqlUserID'],time()-3600);
setcookie ("FBPoolCookie[userTeamID]",$row['sqlUserTeamID'],time()-3600);

Open in new window


I can run this code and get all the cookie array values:
foreach($_COOKIE["FBPoolCookie"] as $tempVar) {
	echo($tempVar . "<br />");
}

Open in new window


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 />");
}

Open in new window


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
Avatar of StingRaY
StingRaY
Flag of Thailand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill

ASKER

Thank you StingRaY. That makes sense and it is good to know what the name of it is.