troubleshooting Question

PHP Symbol Meaning

Avatar of Aludaan
AludaanFlag for United States of America asked on
PHP
2 Comments1 Solution602 ViewsLast Modified:
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);

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.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros