Guest User

Untitled

a guest
Jun 24th, 2018
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. // Arrange the data
  2. $db = Application_Model_Db::db_load();
  3. $sql = "select telephonecode, concat(countryname, '(',telephonecode,')' ) from sh_timezone";
  4. $result = $db->fetchPairs($sql);
  5. //$result = array_merge(array(''=>''), $result);
  6. $result = array_merge_recursive( array(''=>'') , $result);
  7. Zend_Debug::dump($result);
  8.  
  9.  
  10. Output:
  11. <pre>array(3) {
  12. [""] => string(0) ""
  13. [0] => string(11) "Belgium(32)"
  14. [1] => string(14) "Nederlands(31)"
  15. }
  16. </pre>
  17.  
  18.  
  19.  
  20. Expecting as:
  21. <pre>array(3) {
  22. [""] => string(0) ""
  23. [32] => string(11) "Belgium(32)"
  24. [31] => string(14) "Nederlands(31)"
  25. }
  26. </pre>
Add Comment
Please, Sign In to add comment