Once again $result is NOT a scalar, you can't echo it. You need to use var_dump. In any case, also as I said before there is no point outputting $result other than for debug as it is of no use to a user. Why are you echoing it and what do you expect it to display?

The echo of the $entry array elements should not be giving you what you posted so I do not know what that is. For debugging purposes you can use print_r to see if it contains what you expect.