Personally I format my SQL statements this way:
$sql = "INSERT
INTO colors
SET vendor_id='".$_POST['vendor_name']."' ,
color_name='".$_POST['color_name']."',
color_code='".$_POST['color_code']."',
color_html='".$_POST['color_html']."'";
This gives me a nicely formatted SQL statement inside my code. Ofcourse if I tried to print this out I'd get a very ugly mess that had lots of spaces. I don't typically need to print out my sql statements on a web page (as say phpMyAdmin does). But I'm sure it wouldn't be too much effort to build some code to take in a string and format it to display in a logical way. Hell you could just look at how phpMyAdmin does it and copy that.
P.S. if that doesn't look nice adjust the size of your browser since this forum will move text around to fit the window size.