Skip to content

Instantly share code, notes, and snippets.

@pjaudiomv
Last active December 27, 2018 17:18
Show Gist options
  • Save pjaudiomv/1c67cf61d79d29ff56d66677dd48dddd to your computer and use it in GitHub Desktop.
Save pjaudiomv/1c67cf61d79d29ff56d66677dd48dddd to your computer and use it in GitHub Desktop.
<?php
$root_server = "https://your_bmlt_server.org/main_server";
$counties = json_decode(file_get_contents($root_server . "/client_interface/json/?switcher=GetFieldValues&meeting_key=location_sub_province"), true);
$countiesArray = array();
foreach ($counties as $county) {
$countiesArray[] = $county['location_sub_province'];
}
foreach ($countiesArray as $county) {
$countiesString .= "'" . addslashes($county) . "',";
}
$countiesString = rtrim($countiesString,",");
echo '<pre>';
echo '$meeting_counties_and_sub_provinces = array(';
echo $countiesString;
echo ');';
echo '</pre>';
@pjaudiomv
Copy link
Author

this could be run from your browser, if running locally just make sure to not include the <pre> tags in your autoconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment