arrays - Which is the more efficient way to store this ordered pair in php? -


Which of the following two data structures is "better"?

  array ('key' = 'Gt; array (1,2,3,4)  

OR:

 The array ('key', array (1,2, 3,4)) means that it is better to store the array as the second element in the two element array, or As an element in the array with the key, 'key'. 

Assume that for my purpose, in case of convenience, they are equivalent. I'm only curious whether someone uses more resources than anyone else.

What you use for whatever you use, you are trying to store.

If the key values ​​are related to the array and its unique, use the key / value.

Worried about the resources used in this situation, microscopic optimization and an irrelevant distraction.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -