fork download
  1. <?php
  2.  
  3. $res['email'] = array('email1@gmail.com', 'email2@gmail.com', 'email3@gmail.com');
  4. $resJson = array();
  5. for ($i = 0; $i < count($res); $i++):
  6. array_push($resJson, $res['email']);
  7. endfor;
  8.  
  9.  
  10. echo json_encode($resJson);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
[["email1@gmail.com","email2@gmail.com","email3@gmail.com"]]