# Mysql parsing/formatting help

**URL:** <https://forum.kirupa.com/t/mysql-parsing-formatting-help/252863>\
**Category:** Uncategorized\
**Created:** [February 24, 2008, 6:49pm UTC](https://forum.kirupa.com/t/mysql-parsing-formatting-help/252863 "2008-02-24T18:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gixm87](https://avatars.discourse-cdn.com/v4/letter/g/ac91a4/32.png) [@Gixm87](https://forum.kirupa.com/u/Gixm87)\
**Post date:** [February 24, 2008, 6:49pm UTC](https://forum.kirupa.com/t/mysql-parsing-formatting-help/252863/1 "2008-02-24T18:49:17Z")

</div>

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

```php

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

```php

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

```

Before that i had tried just outputting it straight

```php

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

```

THANKS AGAIN
