user3092953 user3092953 - 2 months ago 12x
MySQL Question

Echo Variable inside of echo statement

I am trying to echo a php variable inside of a php echo statement.

I have a column in a MySql database called

which contains a value such as

I am calling this from the DB as

$displayCode = $row ['display_code'];

And trying to echo like this:

echo "<div class='col-md-3'>


However this is printing
instead of a number

Is there a way to do this?

By the way, I already have this script on the page

<?php $result100=mysql_query("SELECT * FROM customers")or die('Error 27' . mysql_error());
$num_rows_customers = mysql_num_rows($result100);?>


About Variable variables read here

$displayCode = 'num_rows_customers';
$num_rows_customers = 10;  
           echo "<div class='col-md-3'>