Jump to content

[SOLVED] echo function syntax problem


will35010

Recommended Posts

I'm trying to echo out a function. I think my syntax is wrong. I've tried a few different ways, but I can't get it working. Any direction would be helpful.

 

The problem line is:

<td><div align='center'>MPG: "echo getMpg($row['vin'])"</div></td>

 

 

while($row = mysqli_fetch_array($query)) {
echo "<table width='900' border='1' align='center'>
        <tr>
          <td width='225' align='center' scope='col'>VIN: " . $row['vin'] . "</td>
          <td width='228' align='center' scope='col'>YEAR: " . $row['year'] . "</td>
          <td width='225' align='center' scope='col'>MAKE: " . $row['make'] . "</td>
        </tr>
        <tr>
          <td><div align='center'>PLATE: " . $row['plate'] . "</div></td>
          <td><div align='center'>EXPIRE: " . $row['expire'] . "</div></td>
          <td><div align='center'>MODEL: " . $row['model'] . "</div></td>
        </tr>
        <tr>
          <td><div align='center'>CURRENT MILEAGE: ". $row['mileage'] ."</div></td>
          <td><div align='center'><a href='lib/forms/oil.php?vin=".$row['vin']."'target='_blank'>Get Oil Info</a></div></td>
          <td><div align='center'>MPG: "echo getMpg($row['vin'])"</div></td>
        </tr>
      </table>
  </tr>
</table>";
}	

Link to comment
https://forums.phpfreaks.com/topic/162583-solved-echo-function-syntax-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.