PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm returning from a MySQL DB a vin # for a car and would like to highlight the last 8 characters. Looking for some clues as to where to start my research.
<?php
$con = mysql_connect("DELETED");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("cars1", $con);
$result = mysql_query("SELECT * FROM cars WHERE id = $_POST[carid]");
while($row = mysql_fetch_array($result))
{
echo $row['VIN'];//Somehow just display the first 9 characters of $row['VIN']
?>
<strong>
<?
echo $row['VIN'];//Somehow just display the last 8 characters $row['VIN']
?>
</strong>