Last active
December 22, 2015 03:39
-
-
Save bakura10/6411495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// I need to get a specific key of the array (for instance "c"), and then be able FROM THIS new array, | |
// go back to the previous level | |
$data = array( | |
'a' => 'aaaa', | |
'b' => 'bbbb', | |
'c' => array( | |
'd' => 'dddd', | |
'e' => 'eeee', | |
'f' => array( | |
'g' => 'gggg', | |
'h' => 'hhhh' | |
), | |
'i' => 'iiii' | |
), | |
'j' => 'jjjj' | |
); | |
$toTest = &$data['c']; | |
//var_dump($toTest); | |
$toTest = prev($toTest); | |
var_dump($toTest); // I want to test to be array('a' => 'aaaaa'....) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment