Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dataset Example Row:
- 0_id : 25
- 0_firstname : Slyvester
- 0_lastname : Oosterbos
- 1_id : 91
- 1_email : sly@whatever.com
- 2_id : 266
- 2_telephone : 09987 787424
- 3_id : 33
- 3_studentid : 77942421
- 3_schemeofstudy : 71
- 4_id : 101
- 4_projtitle : Writing a Recursive Function!
- Desired result:
- array(
- [0] => array (
- [0] => array(
- [0] => array(
- 'id' => 25,
- 'firstname' => Slyvester,
- 'lastname' => Oosterbos,
- 'childtables' => array(
- [1] => array(
- [0] => array(
- 'id' => 91,
- 'email' => sly@whatever.com
- ),
- [1] => array(
- 'id' => 92,
- 'email' => sly@supbitch.com
- ),
- [2] => array (
- [0] => array(
- 'id' => 266,
- 'telephone' => 09987 787424
- ),
- ),
- [3] => array(
- [0] => array(
- 'id' => 33,
- 'studentid' => 77942421,
- 'schemeofstudy' => 71,
- 'childtables' => array(
- [4] => array (
- [0] => array(
- 'id' => 101,
- 'projtitle' => Writing a Recursive Function!
- )
- )
- )
- )
- )
- )
- )
- )
- Array Key Tree
- array (
- [0] => array (
- [1] => true,
- [2] => true,
- [3] => array (
- [4] => true
- )
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement