php - MySQL data does not appear in tooltip -


i want show mysql data inside tooltip. here code:

<?php     $abfrage = "select * tester";     $ergebnis = mysql_query($abfrage);     while($row = mysql_fetch_object($ergebnis)){         $name=$row->name;         $bech=$row->beschreibung;     } ?>  <a href="" title="<?=$name?> <?=$bech?>">test link</a> 

it shows me empty tooltip nothing inside. if print 2 variables, mysql data appear. there mistake in code?

thanks.

this in conjunction seth mcclaine's answer.

echo values using:

<?php echo $name; ?> <?php echo $bech; ?> 

instead of <?=$name?> <?=$bech?>

the use of short tags not recommended this.

reformatted code:

<?php     $abfrage = "select * tester";     $ergebnis = mysql_query($abfrage);     $row = mysql_fetch_object($ergebnis);         $name=$row->name;         $bech=$row->beschreibung; ?>  <a href="" title="<?php echo $name; ?> <?php echo $bech; ?>">test link</a> 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -