-2

Possible Duplicate:
Reference - What does this symbol mean in PHP?

I am looking at using a custom Taxonomy for a page and reading through the codex I saw code examples using "=>" and "__"

Could someone clarify what these symbols are for and what they are doing?

Thank you!

Community
  • 1
  • 1
grmdgs
  • 585
  • 6
  • 17
  • 1
    This is not an exact duplicate as the second *symbol* referenced does have a specific usage in WordPress ([internationalization function](http://codex.wordpress.org/I18n_for_WordPress_Developers)). – Jason McCreary Nov 05 '12 at 19:05
  • 1
    there's no option for 50% duplicate. –  Nov 05 '12 at 19:08

1 Answers1

2

The => is used for defining the value of a key in an associative array:

$array = array('key' => 'value');

The __() function is used for translations:

$text = __($textkey, $textdomain);
doublesharp
  • 26,888
  • 6
  • 52
  • 73