Dit is mijn fout: Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /home/xtahosted/domains/connectxs.org/public_html/testnieuws.php on line 17

Mijn source:
<html>

<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Door</title>
</head>

<body>
<?
include "config.php";

$select = "SELECT * FROM updates ORDER by id DESC LIMIT 0,10";
$query = mysql_query($select) or die (mysql_error());
while ($list = mysql_fetch_object($query)) {

echo "<table width="50%" border="1" height="192" bordercolor="#000000">
<tr>
<td class="titel" width="34%" height="21">Door:$list->naam&nbsp;@$list->datum</td>
<td class="titel" width="64%" height="21">$list->titel</td>
</tr>
<tr>
<td class="p" height="21">Afbeelding:</td>
<td class="datum" height="21" valign="top">Bericht:</td>
</tr>
<tr>
<td class="p" height="56"><img border="0" src="$list->afbeelding" width="100" height="100"></td>
<td class="p" height="56">$list->bericht</td>
</tr>
<tr>
<td class="p" valign="top"><hr width="100%" size="2" noshade>&nbsp;</td>
<td class="p" valign="top"><hr width="100%" size="2" noshade></td>
</tr>
</table><br><br>";
}
echo "<br>";
?>

</body>

</html>
Gebruik eens enkele quotes om een echo mee te beginnen... dus echo '<table blabla bla blabla bla <br>';
moet die br er dan bij?
als je dat wil....ik ga niet alles nalezen om de output te raden.

php moet met enkele quotes ' en html met dubbele quotes "

Alleen query's gebruik ik met dubbele quotes omdat het handiger is.
Kijk ik heb dit gedaan en hij geeft nog steeds dezelfde fout?

<html>

<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Door</title>
</head>

<body>
<?
include "config.php";

$select = "SELECT * FROM updates ORDER by id DESC LIMIT 0,10";
$query = mysql_query($select) or die (mysql_error());
while ($list = mysql_fetch_object($query)) {

echo "<table width=/"50%/" border=/"1/" height=/"192/" bordercolor=/"#000000/">";

echo "<tr>";
echo "<td class="titel" width="34%" height="21">Door:$list->naam&nbsp;@$list->datum</td>";
echo "<td class="titel" width="64%" height="21">$list->titel</td>";
echo "</tr>";
echo " <tr>";
echo "<td class="p" height="21">Afbeelding:</td>";
echo "<td class="datum" height="21" valign="top">Bericht:</td>";
echo "</tr>";
echo "<tr>";
echo "<td class="p" height="56"><img border="0" src="$list->afbeelding" width="100" height="100"></td>";
echo "<td class="p" height="56">$list->bericht</td>
echo "</tr>";
echo "<tr>";
echo "<td class="p" valign="top"><hr width="100%" size="2" noshade>&nbsp;</td>";
echo "<td class="p" valign="top"><hr width="100%" size="2" noshade></td>";
echo "</tr>";
echo "</table><br><br>";
}
echo "<br>";
?>

</body>

</html>
Aan de kleurcodes kun je al zien dat het op regel 20 fout gaat. En waarom nog steeds die dubbele quotes?

<?php
echo "waarde"; // 'fout'

echo 'waarde'; //goed

?>
Dan hoef je ook niet de dubbele quotes in de html te gaan escapen met een \, wat jij nu fout doet met een /.
Hij blijft deze fout geven...:
Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /home/xtahosted/domains/connectxs.org/public_html/testnieuws.php on line 17

<?
include "config.php";

$select = "SELECT * FROM updates ORDER by id DESC LIMIT 0,10";
$query = mysql_query($select) or die (mysql_error());
while ($list = mysql_fetch_object($query)) {

echo '<table width="50%" border="1" height="192" bordercolor="#000000">';

echo '<tr>';
echo '<td class="titel" width="34%" height="21">Door:$list->naam&nbsp;@$list->datum</td>';
echo '<td class="titel" width="64%" height="21">$list->titel</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" height="21">Afbeelding:</td>';
echo '<td class="datum" height="21" valign="top">Bericht:</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" height="56"><img border="0" src="$list->afbeelding" width="100" height="100"></td>';
echo '<td class="p" height="56">$list->bericht</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" valign="top"><hr width="100%" size="2" noshade>&nbsp;</td>';
echo '<td class="p" valign="top"><hr width="100%" size="2" noshade></td>';
echo '</tr>';
echo '</table><br><br>';
}
echo '<br>';
?>
Haal je variabelen buiten quotes:
<?
echo '<td class="titel" width="34%" height="21">Door: '.$list->naam.'&nbsp;@'.$list->datum.'</td>';
?>

i.p.v.
<?
echo '<td class="titel" width="34%" height="21">Door:$list->naam&nbsp;@$list->datum</td>';
?>

Edit: Waar slaat die @ trouwens op? Toch niet om foutmeldingen te onderdrukken? Dan kun je beter je ogen sluiten of je beeldscherm uitschakelen...
Waar slaat die @ trouwens op? Toch niet om foutmeldingen te onderdrukken? Dan kun je beter je ogen sluiten of je beeldscherm uitschakelen...


hahah
nee niet als foutmelding gwn van gepost door blabla @dezetijd
Hier nog eens een probleem...
www.connectxs.org/index.php?pagina=testnieuws

hij publiceert het nieuws niet?:s:s:s

<html>

<head>
<meta http-equiv="Content-Language" content="nl-be">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Door</title>
</head>

<body>
<?
include "config.php";

$select = "SELECT * FROM updates ORDER by id DESC LIMIT 0,10";
$query = mysql_query($select) or die (mysql_error());
while ($list = mysql_fetch_object($query)) {

echo '<table width="50%" border="1" height="192" bordercolor="#000000">';

echo '<tr>';
echo '<td class="titel" width="34%" height="21">Door:'.$list->naam.'&nbsp;@'.$list->datum.'</td>';
echo '<td class="titel" width="64%" height="21">'.$list->titel.'</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" height="21">Afbeelding:</td>';
echo '<td class="datum" height="21" valign="top">Bericht:</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" height="56"><img border="0" src="'.$list->afbeelding.'" width="100" height="100"></td>';
echo '<td class="p" height="56">'.$list->bericht.'</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="p" valign="top"><hr width="100%" size="2" noshade>&nbsp;</td>';
echo '<td class="p" valign="top"><hr width="100%" size="2" noshade></td>';
echo '</tr>';
echo '</table><br><br>';
}
echo '<br>';
?>

</body>

</html>

Reageren