Ho uno stupido problema che non so come risolvere.. ho un file php all'interno del quale richiamo una funzione in questo modo:
codice:
<?php
include("../include/select.php");
?>
<table border="1" width="100%" rules="all">
<tr>
<th>OraEvento</th>
<th>Luogo</th>
<th>Km</th>
<th>Evento</th>
<th>ADBlue</th>
<th>Note</th>
<th>SR</th>
</tr>
<?php
echo select_movimenti();
?>
</table>
per stampare una tabella contenente dei dati presi da un db, solo che anziché stampare il contenuto dell'array mi stampa il nome dell'array..
codice:
function select_movimenti()
{
$date = select_date();
$data = $date['giorno'];
$sql=mysql_query('SELECT movimenti.id, movimenti.ora, movimenti.luogo, movimenti.km, movimenti.evento, movimenti.adblue, movimenti.note, semirimorchio.targa from movimenti, semirimorchio where movimenti.id_sr=semirimorchio.id order by id desc') or die(mysql_error());
$html= '';
while($row=mysql_fetch_array($sql))
{
$html .= '<tr>';
$html .= '<td>$row["ora"]</td>';
$html .= '<td>$row["luogo"]</td>';
$html .= '<td>$row["km"]</td>';
$html .= '<td>$row["evento"]</td>';
$html .= '<td>$row["adblue"]</td>';
$html .= '<td>$row["targa"]</td>';
$html .= '<td>$row["note"]</td>';
$html .= '</tr>';
}
return $html;
}
come risolvo questo inghippo?..