Hello,
First-off, what are you trying to do?
Second, you have some mistakes...
1. Why would you make those 3 seperate codes?
As you can see you have forgotten to close the second one, never the less did you just add a random "foo foo this is..." that php does not know how to read. To fix that just close that piece of unidentified code in echo ""; or print ""; turning it into a string.
From here I can't really help you since I don't you know what you are trying to do.
Shaffer.