Replaced echo with print_r for better debug output.