Title: results for php function not returning an array
Last modified: August 20, 2016

---

# results for php function not returning an array

 *  Resolved [jvanderbilt](https://wordpress.org/support/users/jvanderbilt/)
 * (@jvanderbilt)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/results-for-php-function-not-returning-an-array/)
 * Hi, I am calling the EM_Locations function as follows:
 * EM_Locations::output(array(‘limit’=>’10’,’orderby’=>’name’, ‘town’=>’Chicago’,‘
   array’));
 * I am getting results, but they are coming back as an html unordered list (ul)
   and not an array. I need them in an array to be able to target specific location
   properties. The documentation says that passing “array” as an argument will force
   results to come back in an array, but it’s not working. Anyone have any idea 
   what I’m doing wrong?
 * [http://wordpress.org/extend/plugins/events-manager/](http://wordpress.org/extend/plugins/events-manager/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/results-for-php-function-not-returning-an-array/#post-3367090)
 * you can try something like EM_Locations::get
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/results-for-php-function-not-returning-an-array/#post-3367204)
 * your orderby value is wrong, try location_name instead of just name

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘results for php function not returning an array’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)

 * 2 replies
 * 3 participants
 * Last reply from: [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/results-for-php-function-not-returning-an-array/#post-3367204)
 * Status: resolved