Hi Please View Below Code :
\\n\"; for( $i = 0 ; $i < 10 ; $i++ ) { echo \"$i\\n\";
It is correct. Works fine for me from CLI running PHP 5.3.3. If it's not working for you, your PHP install may have output buffering disabled.
I would also suggest putting ob_end_flush() at the end of your script to close the output buffer.