Why are you using an array called args[0]?

Wrap your code in the [CODE] blocks and format it so its easier to read and and understand.