What is the meaning of => ?

0 views
Skip to first unread message

Cecil Champenois

unread,
Aug 24, 2010, 3:01:14 PM8/24/10
to PHP Group

 
Cecil

Robert Gonzalez

unread,
Aug 24, 2010, 3:14:32 PM8/24/10
to professi...@googlegroups.com
Didn't someone just ask this question like two days ago?

It's the array assignment/access operator, or the PHP Double Arrow operator.

http://www.robert-gonzalez.com/2009/03/04/php-operators-double-and-single-arrow/

On Tue, Aug 24, 2010 at 12:01 PM, Cecil Champenois <cecilch...@yahoo.com> wrote:

 
Cecil

--
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
 
For information or project assistance please visit :
http://www.360psg.com
 
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professi...@googlegroups.com
To unsubscribe from this group, send email to Professional-P...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP

Cecil Champenois

unread,
Aug 24, 2010, 3:50:27 PM8/24/10
to professi...@googlegroups.com
Muchas gracias para la explicacion.
 
Cecil



From: Robert Gonzalez <robert.anth...@gmail.com>
To: professi...@googlegroups.com
Sent: Tue, August 24, 2010 12:14:32 PM
Subject: Re: [Pro. PHP Dev.] What is the meaning of => ?

Robert Gonzalez

unread,
Aug 24, 2010, 3:53:01 PM8/24/10
to professi...@googlegroups.com
De nada.

Cecil Champenois

unread,
Aug 24, 2010, 4:58:07 PM8/24/10
to professi...@googlegroups.com
Well, I did run into a brief explanation of this operator, => on page 85 of the 4th Edition of PHP and MySQL Web Development.
 
Initializing an Array
 
The following code creates an array with product names as keys and prices as values:
 
$prices = array('Tires'=>100, 'Oil'=>10, 'Spark Plugs'=>4);
 
Here's the big explanation:
 
"The symbol between the keys and values is simply an equal sign immediately followed by a greater than symbol."
That's it? Yes, sad but true.
 
Robert, your explanation was much better. Hopefully, they'll as you to edit their 5th edition?
 
Cecil



From: Robert Gonzalez <robert.anth...@gmail.com>
To: professi...@googlegroups.com
Sent: Tue, August 24, 2010 12:14:32 PM
Subject: Re: [Pro. PHP Dev.] What is the meaning of => ?

Robert Gonzalez

unread,
Aug 24, 2010, 4:59:22 PM8/24/10
to professi...@googlegroups.com
Haha, that would be awesome. Thanks for the compliment.
Reply all
Reply to author
Forward
0 new messages