php. dictionary data structure, (integer, string) as a key -


in python dictionary can use tuples keys. can use key next combination: (integer, string). want same in php. standard php array can use strings or integers. splobjectstorage uses objects key.

how can same functionality in php?

the simple answer cannot. functionally equivalent though should simple:

$array["$int,$str"] 

or maybe multi-dimensional array:

$array[$int][$str] 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -