Errore nel echo

valient13

Utente Attivo
6 Apr 2012
96
0
0
Sicilia
PHP:
<?php 
require_once __DIR__ . '/header.php';
	
	$query_news="SELECT * FROM articoli";
	$esegui_query_news=mysql_query($query_news) or die(mysql_error());
?>
  <!-- Content -->
  <div id="content">
  	<div id="conteiner">
		<center><h2>News<h2></center>
		<?php 
		while($fetch=mysql_fetch_assoc($esegui_query_news)) {
		echo"
		<table width=\"100%\">
			<tr>
				<td width=\"70%\">".echo $fetch['titolo'];."</td>
				<td width=\"30%\">".echo $fetch['data'];."</td>
			</tr>
			<tr>
				<td width=\"100%\" colspan=\"2\">".echo $fetch['testo'];."</td>
			</tr>
		</table>
		";
		}
		?>
	</div>
    <?php require_once __DIR__ . '/sidebar.php'; ?>
  </div>
<?php require_once __DIR__ . '/footer.php'; ?>

Come risolvo, mi dice:
Parse error: syntax error, unexpected T_ECHO in news.php on line 16
 
Ultima modifica:
ci ho pensato dopo, non c'è bisogno dell'echo xD comunque per dividere in pagine i risultati come faccio:
PHP:
<?php 
require_once __DIR__ . '/header.php';
	
	$query_news="SELECT * FROM articoli";
	$esegui_query_news=mysql_query($query_news) or die(mysql_error());
?>
  <!-- Content -->
  <div id="content">
  	<div id="conteiner">
		<center><h2>News<h2></center>
		<?php 
		while($fetch=mysql_fetch_assoc($esegui_query_news)) {
		echo "
		<table width=\"100%\">
			<tr>
				<td width=\"70%\">".$fetch['titolo']."</td>
				<td width=\"30%\">".$fetch['data']."</td>
			</tr>
			<tr>
				<td width=\"100%\" colspan=\"2\">".$fetch['testo']."</td>
			</tr>
		</table>
		";
		}
		?>
	</div>
    <?php require_once __DIR__ . '/sidebar.php'; ?>
  </div>
<?php require_once __DIR__ . '/footer.php'; ?>
 

Discussioni simili