Home>

cakephp and php beginners are following the source.

of the following part I think the result of var_dump ($key);is an associative array key,
The result of var_dump ($this->{$key});is the array value.
Is foreach $key different from $this->{$key}?
Please give me an answer.

foreach ($defaults as $key =>$value) {

var_dump ($key);
Result: String (14)"logoutRedirect"
var_dump ($value);
Result: array (2) {["controller"] =>string (5)"users"["action"] =>string (11)"admin_login"}
var_dump ($this->{$key});
Result: array (2) {["controller"] =>string (5)"users"["action"] =>string (11)"admin_login"}
die;

}