Can you tell me what $element is meant to be ? I can kinda of get my head round the rest its just that variable?

Thanks

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields