0

what does this construct mean in PHP ? It is storing a variable called "function" with his String value in an array ?

array('function' => 'theme_select_as_checkboxes')

thanks

aneuryzm
  • 63,052
  • 100
  • 273
  • 488

4 Answers4

4

its just an associative array and unless some context is given, doesnt mean anything special!

Sabeen Malik
  • 10,816
  • 4
  • 33
  • 50
1

Seems like declaring an associative array. With sucha an array, you can retrieve the content of the array this way :

$myArray = array('function' => 'theme_select_as_checkboxes');
echo $myArray['function']; // Prints 'theme_select_as_checkboxes

No magic in here ! ;)

Clement Herreman
  • 10,274
  • 4
  • 35
  • 57
0

Appears to be a function/method name that can be called at a later time. Other than the data, it looks to be just a standard array.

You may be interested in this question as well: How to call PHP function from string stored in a Variable.

Community
  • 1
  • 1
Sampson
  • 265,109
  • 74
  • 539
  • 565
0

this is not a special structure. http://en.wikipedia.org/wiki/Associative_array http://www.bellaonline.com/articles/art31316.asp

osm
  • 4,186
  • 3
  • 23
  • 24