what is => is php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
walex
Forum Newbie
Posts: 4
Joined: Fri Sep 28, 2007 5:12 am

what is => is php

Post by walex »

I've seen => in php in a few places and cant figure out what it means. Any help?
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Greater or equal to.

Code: Select all

$a = $b = 10;

if($a >=$b)
  echo "A is either greater or equal to B";

I've always used >=. Didn't realise => worked.
walex
Forum Newbie
Posts: 4
Joined: Fri Sep 28, 2007 5:12 am

Post by walex »

I dont think thats right, whenever I've seen it its never been in a compare statement.
Hemlata
Forum Commoner
Posts: 35
Joined: Mon Sep 10, 2007 5:40 am
Location: India
Contact:

Post by Hemlata »

Hello,

Please give some example code where you find this kind of code. This will help others to solve your issue.

Regards,
walex
Forum Newbie
Posts: 4
Joined: Fri Sep 28, 2007 5:12 am

Post by walex »

Here is an example of its use

Code: Select all

static $areas = array( 
		'reviews' => 'Restaurant Reviews' 
	);
Must be something to do with arrays...???
Hemlata
Forum Commoner
Posts: 35
Joined: Mon Sep 10, 2007 5:40 am
Location: India
Contact:

Post by Hemlata »

Hello,

Yes, the syntax is related with the array. Check the following url to learn more about it.

http://in.php.net/manual/en/function.array.php

Regrads,
walex
Forum Newbie
Posts: 4
Joined: Fri Sep 28, 2007 5:12 am

Post by walex »

cool, thanks
Post Reply