PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You are making it more difficult by squishing all the code onto single lines. Dont be scared to create variables and use them! Nesting multiple functions is not cool nor great for when you come back and edit the code in the future.
At a glance, I guess your problem is probably here...
I suggest clean up your code and make it more readable. You will probably notice your mistake then, if not post it back here in its new cleaned up state and we will be able to spot it (mention which line the error is occuring on)