Search code examples
phparrays

How to declare an associative array?


I'm wondering if it's possible to define an array of parameters (sorry dunno how it's called) like in jQuery also in PHP:

{myCaption: 'bla', myValue: 123 }

Solution

  • $arry = array('myCaption'=>"bla",'myValue'=>123);