- This topic has 4 replies, 2 voices, and was last updated 8 years, 7 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › How do I create a list of Locations or Towns directly in PHP?
Tagged: filter towns locations
I need to create a dropdown list of either locations or better yet, the unique towns in my locations list, but directly in PHP, not using the short tag in a page. How do I do this? Can I somehow access the built in PHP function and return it’s array?
Look for eme_get_locations()
Yeah, I tried calling it but nothing happens, do I need to call it statically or something?
I found a way to add it with the short tag, but now that I have a list, how do i sort it by town alphabetically?
eme_get_locations() should work. It returns an array of course, so you should do something like this:
$locations=eme_get_locations();
print_r($locations);