Skip to content

Instantly share code, notes, and snippets.

@juniorb2ss
Created January 7, 2014 22:33
Show Gist options
  • Save juniorb2ss/8308192 to your computer and use it in GitHub Desktop.
Save juniorb2ss/8308192 to your computer and use it in GitHub Desktop.
else {
/**
* query
*/
$ws_table_cg = $this->db->get('ws_cargos');
$data = $ws_table_cg->result();
/**
* Resultado?
*/
if($data->count_all_results())
{
foreach ($data as $line)
{
/**
* Resposta Válida
*/
$objDataValid['valid'] = 'TRUE';
/**
* Retornando array com os resultados
*
* $line->id = columm responsável pelo id do registro
*
* Exemplo Output: options[5][subarray]
*/
$objDataValid['options'][$line->id] = $line->ws_cargo_type . "</br>";
}
}
else
{
$objDataValid['valid'] = 'FALSE';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment