Removing the whitespace and close tag for php