I realize you might be new, but I'm trying to give you the pieces and all you have to do is put them together. For example, you say this:
echo implode(',', $ipz);
outputs the data you want, but you want to add a pipe to the end of it.
So.. you've got one string piece:
implode(',', $ipz)
and you want to add another on to it:
"|"
in the same away I added " world!" onto the end of "Hello" above.
Sorry if it seems like I'm being tough, but you're going to have a tough time learning a programming language (any, not just PHP) if someone just feeds you code rather than letting you figure out a basic syntax problem on your own.
Look at the comparison I made above, then look at my coding snippet in my previous post. Try to do the same with your code and post what you end up with - even if you think it's horribly wrong.