cartfredri
-
Posts
6 -
Joined
-
Last visited
Posts posted by cartfredri
-
-
Just wanted to know, if there is going to be a new edition of this book in the near future and if there is, when will this book be out, please let me know.
Best Regards,
Fred
-
I mean where you say for example '245 => array()' I want to display this without needing to use 'print_r' or 'var_dump' and use a custom call back function in 'array_walk_recursive'
-
Sorry about the delay! Behind schedule keeping up with the forums! It sounds like you have the basic grasp of looping through a multidimensional array. If you know the depths of the array, you can use X number of nested foreach loops. Otherwise you'll need to use a recursive function or http://php.net/array_walk_recursive, which is a shortcut there.
The PHP Advanced book does have a recursive example of example this.
Hi Larry,
been away for summer, just a quick one you know the 'array_walk_recursive' function how would I capture the Keys which are also arrays in the the multi-dimensional array because I used the array_map and it worked with the call back function but the key which are arrays didnt display for example could I say in user defined function '$key1 => $key2' => $value' I know this isnt quite right but i'm a bit unsure, please let me know.
bless,
fred.
-
hello,
can someone please let me know.
fred.
-
Hi Larry,
i'm quite new to the forum, just have a quick question from chapter one from the pursue section, basically how would I display each element in the multidimentional array? without using print_r. Would I use a foreach loop to loop through element or within a function use a array_key_exist to test if key exist, then if true return that data from array please let me know.
regards,
fred
Is there going to be a new edition of 'PHP Advanced and Object Oriented programming' book?
in PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
Posted
Ok thanks for reply, however as PHP 7/5 is going to be retired later this year for good, do you think that an updated PHP Advanced OOP book will be out in time to reflect the new changes in PHP 8, and if you may have any idea of it ever coming out, have a great day!
best, Fred