Mysql parsing/formatting help

Thanks in advance for any help you can offer

Ok so im trying to parse some sql in php with formatting i keep getting a syntax error but cannot figure why for the life of me ive been staring at it for hours

So heres the code everything else works cept this



while($row = mysql_fetch_array($result))
  {
  $left = $i * ($space + $width)
  $formatting = '<div style="width:100px; height:150px; left:'.$left.'px; top:'.$top.'px; position: absolute;">'
  echo $formatting;
  echo '<a href="userview.php?vid='. $row['vid'].'">';
  echo '<img src="" width=100 hight=70><br />';
  echo $row['vname'];
  echo '</a>';
  echo '</div>';
  $i++;
  if ($i == 4){
  $top = 180;
  };
};


Im getting the syntax error on this line


$formatting = '<div style="width:100px; height:150px; left:'.$left.'px; top:'.$top.'px; position: absolute;">'

Before that i had tried just outputting it straight


  echo '<div style="width:100px; height:150px; left:'.$left.'px; top:'.$top.'px; position: absolute;">';

THANKS AGAIN