紧随辉哥步伐!
也做了个遍历无穷数组递归函数~~
- function bl($str){
- function blin($value){
- foreach($value as $key1=>$value1)
- {
- if(!is_numeric($key1))
- {
- echo '->'.$key1.'-><br />';
- }
- if(is_array($value1))
- {
- blin($value1);
- }
- else
- {
- echo ' '.$value1.'<br />';
- }
- }
- }
- foreach($str as $key=>$value)
- {
- if(!is_numeric($key)){
- echo $key.'->'.'<br />';
- }
- else{
- echo $value.'<br />';
- }
- if(is_array($value))
- {
- blin($value);
- }
- }
- }