Parse error: syntax error, unexpected $end in

Hi everyone,

I get the following error message:
Parse error: syntax error, unexpected $end in
but again can’t see where I went wrong?

[php]$string=“SELECT * FROM downloads WHERE mft_id=”.$row[‘id_mft’]." ORDER BY id_dl DESC";
$query=mysql_query($string);
$count=01;
while($r=mysql_fetch_array($query)){[/php]

And I get this error on this statement.

Parse error: syntax error, unexpected $end : eval()'d code on line 5

I can’t see what I’m going wrong, any ideas?

[php]$s=“SELECT * FROM manufacturers ORDER BY name_mft ASC”;
$q=mysql_query($s);
$break=2;
$breaks=2;
while($row=mysql_fetch_array($q))[/php]

Please post the entire code you are using, without it answering is partly guesswork.

In the first block you are ending the while with a {, in the second block you have none. I am guessing you aren’t using curly braces properly…

[php]$string = “SELECT * FROM downloads WHERE mft_id=” . $row[‘id_mft’] . " ORDER BY id_dl DESC";
$query = mysql_query($string);
$count = 01;
while ($r = mysql_fetch_array($query)) {
// while condition is true, do this.
}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service