For one, it's easier to visualize the array if you look at the raw output of the print_r() command. Either view the source code of the page rendered by your browser, or just wrap the output in <pre>..</pre> tags.
If you do that, I think it'll be easy to spot why $result[0] doesn't make sense; $result isn't a numerically indexed array. You'll find that it does have a key with the value of 'parameters' instead.