added array_walk_recursive function to handle multi-dimensional array possibility