Mysql
 sql >> Database >  >> RDS >> Mysql

PHP MySQL

Non usi <?php echo ... ?> quando sei già in modalità PHP e fai eco a qualcosa. Basta concatenare la variabile.

echo '<center><strong><font color="#3BB9FF">' . ucfirst($row['t_fn']) . '&nbsp;' . ucfirst($row['t_ln']) . '</font></strong></center>';

<?php echo ... ?> viene utilizzato quando si emette direttamente HTML e si desidera inserire un po' di PHP. Ad esempio, in questo modo:

if($row['t_type'] == 1)
{ ?>
<center><strong><font color="#3BB9FF"><a href="view_t_profile.php?t_id=<?php echo $row['t_id']; ?>&t_type=<?php echo $row['t_type']; ?>" class="cls" target="_blank"><br />View Profile</a></font></strong></center>
<center><strong>Main Contact</strong></center>
<center><strong><font color="#3BB9FF"><?php echo ucfirst$row['t_fn']).'&nbsp;'.ucfirst($row['t_ln']); ?></font></strong></center>
<?php
}