I have this query in mysql
that generates a print screen with a number
<?php $contratos_query = tep_db_query("select * from " . TABLE_CONTRATOS . "");
$contratos = tep_db_fetch_array($contratos_query);?>
The screen shows the complete number with this command
<?php echo $contratos['numero_contrato'] ; ?>
Example: 8787E01 = contract_number
I have to separate two fields from the same cell where 8787 is the contract number and E01 is the delivery
I need a print screen where I only show the first 4 digits
print: 8787
and another where it only shows the 3 last digits .
print: E01
Note: all the number_contract of the table always have the same length the contract are 4 first numbers and are on the left and the deliveries are always 3 last numbers and they are on the right.
how I achieve a print that the <?php echo $contratos['numero_contrato'] ; ?>
shows only the first 4 digits and then another print <?php echo $contratos['numero_contrato'] ; ?>
that only shows the last 3 .