Skip to content

Instantly share code, notes, and snippets.

@KnowTheCodePro
Created February 16, 2016 19:24
Show Gist options
  • Save KnowTheCodePro/8bdc8780214a729dbe2e to your computer and use it in GitHub Desktop.
Save KnowTheCodePro/8bdc8780214a729dbe2e to your computer and use it in GitHub Desktop.
PHP Array - Visualizing the Array
<?php
namespace KnowTheCode;
$main_st_homes = array(
1058 => array(
'floor1' => array(
100 => array(
'name' => 'Smith',
),
101 => array(
'name' => 'Thompson',
),
),
'floor2' => array(
200 => array(
'name' => '',
),
201 => array(
'name' => 'Nebs',
),
202 => array(
'name' => 'Jacobson',
),
),
'floor3' => array(
300 => array(
'name' => 'Reynolds',
),
301 => array(
'name' => '',
),
302 => array(
'name' => 'Tonya',
),
),
'floor4' => array(
400 => array(
'name' => 'Ballor',
),
402 => array(
'name' => 'Crest',
),
),
'floor5' => array(
500 => array(
'name' => 'Miller',
),
),
),
);
ddd( $main_st_homes[1058]['floor3'][302]['name'] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment