Exemplo n.º 1
0
 function getCurrencies()
 {
     global $toC_Json;
     $osC_Currencies = new osC_Currencies();
     $records = array();
     foreach ($osC_Currencies->getData() as $currency) {
         $records[] = array('currencies_id' => $currency['id'], 'text' => $currency['title']);
     }
     $response = array(EXT_JSON_READER_ROOT => $records);
     echo $toC_Json->encode($response);
 }