Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Dataset Example Row:
  2.  
  3. 0_id : 25
  4. 0_firstname : Slyvester
  5. 0_lastname : Oosterbos
  6. 1_id : 91
  7. 1_email : sly@whatever.com
  8. 2_id : 266
  9. 2_telephone : 09987 787424
  10. 3_id : 33
  11. 3_studentid : 77942421
  12. 3_schemeofstudy : 71
  13. 4_id : 101
  14. 4_projtitle : Writing a Recursive Function!
  15.  
  16.  
  17. Desired result:
  18.  
  19. array(
  20. [0] => array (
  21. [0] => array(
  22. 'id' => 25,
  23. 'firstname' => Slyvester,
  24. 'lastname' => Oosterbos,
  25. 'childtables' => array(
  26. [1] => array(
  27. 'id' => 91,
  28. 'email' => sly@whatever.com
  29. ),
  30. [2] => array (
  31. 'id' => 266,
  32. 'telephone' => 09987 787424
  33. ),
  34. [3] => array(
  35. 'id' => 33,
  36. 'studentid' => 77942421,
  37. 'schemeofstudy' => 71,
  38. 'childtables' => array(
  39. [4] => array (
  40. 'id' => 101,
  41. 'projtitle' => Writing a Recursive Function!
  42. )
  43. )
  44. )
  45. )
  46. )
  47.  
  48.  
  49.  
  50. Array Key Tree
  51.  
  52. array (
  53. [0] => array (
  54. [1] => true,
  55. [2] => true,
  56. [3] => array (
  57. [4] => true
  58. )
  59. )
  60. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement