NOTE: This question was migrated from http://stackoverflow.com/q/27134588/1442685
PHP QUESTION
Almost purely out of curiousity, how can I take an array like this:
array( 'fruit' => 'banana', 'drink' => 'milk')
And convert it to an array like this:
array( 'fruit=banana', 'drink=milk')
Requirements
- Cannot use anonymous functions
- If needed, can only use
array_*
functions that accept callable if that callable is native to PHP - Must be a one-liner solution
This is not for a class. I'm curious to see how clever one can be with array functions. Given the requirements, is it possible?