Ciao a tutti,

estraggo i dati da un database con questa query:


Codice PHP:
<?
include 'admin/connessione.php';
$query="SELECT * FROM $nome_tabella  WHERE 1 AND `username` 
LIKE '
$user_name'";
$immagini=mysql_query($query$db); 
$totale=mysql_num_rows($immagini);
while (
$row=mysql_fetch_array($immagini)){
    

       
       
$tmp.="
    <table width=100% border=0 cellpadding=0 cellspacing=2 >
        <tr> 
         <td   class=text10>
         <table width=100% border=0 cellpadding=0 cellspacing=2 >
        <tr> 
         <td   class=text10>
       </td>
          <td width=69%   class=text>    
              
               [b]Carta:[/b]
{$row[dato]}

                                        
                
          <td width=21%  class=text><a class=l10 href=modifica_record.php?id=
{$row[id]}></a></td>
        </tr>
       
      </table>
      </td>
       </tr>
       
      </table>
      "
;
        
   }
  
echo 
$tmp;  
  
       

?>
il problema è che voglio poter valorizzare la variabile $dato anche al di fuori della query.


tipo: $dato = "valore recuperato "


Grazie