Originally Posted By: WhipLash
Im assuming return is the best to use in this case, but surely swapping the return and the unset would unset the variable before it's return, thus returning null?


Oh, indeed, you're using the variable in the message... sorry shocked
Anyway, a local variable should work in that case, both in- and outside a while loop.