title: How to return a key=>value pair from a function in PHP
body: <p>I need to return a key value pair from a function. It would be preferable to retain the structure of the data. I would like to avoid creating an array with only one value if possible as I do not care for the syntax <code>key($result[0])</code> or an array with two values, as I would like something with a syntax or structure that suggests the key=>value relationship between the values. Is there a more elegant alternative to the array for returning multiple values from a function in php?</p>