$rows = mysql_num_rows($result) ; for ($j=0 ; $j < 3 ; $j++) { for ($i=0 ; $i < 3 ; $i++) { $row = mysql_fetch_array($result) ; echo \'
Whitespace is not displayed verbatim when it's part of HTML text. \r and \n are not universal constants; they are just characters, and it's up to whatever program consumes them to decide what to do with them.
\r
\n
You should use instead.