Guest User

Untitled

a guest
Jan 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. require_once "../../../config.php";
  4.  
  5. $regioes = $regioesDao->pesquisaRegiaoParametro("idRede", $_POST["idRede"]);
  6.  
  7. $options = null;
  8. $i = 0;
  9.  
  10. if ($regioes == null) $options [$i] = "";
  11. else {
  12.  
  13. foreach ($regioes as $regiao):
  14.  
  15. $options[$i]["idRegiao"] = $regiao->getIdRegiao();
  16. $options[$i]["nome"] = $regiao->getNome();
  17. $i++;
  18.  
  19. endforeach;
  20.  
  21. }
  22.  
  23. echo json_encode($options);
  24.  
  25. ?>
  26.  
  27. else {
  28.  
  29. foreach
  30.  
  31. print_r($regioes);
  32.  
  33. print_r($options);
  34.  
  35. null
Add Comment
Please, Sign In to add comment