MrTV
asked on
limit out put only first 50 leter php mysql
<td><?php echo $row_Recordset1['BilDetPro Name']; ?></td>
In the code above how can i set up to show only 50 first leter in the cell in case it have more than 50 leter
for printing purpose
In the code above how can i set up to show only 50 first leter in the cell in case it have more than 50 leter
for printing purpose
<?php require_once('../Connections/localhost.php');
mysql_select_db($database_localhost, $localhost);
$query_Recordset1 = "SELECT * FROM billingdetail WHERE BilDetRef = 31";
$Recordset1 = mysql_query($query_Recordset1, $localhost) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style2 {
font-size: 14px;
font-weight: bold;
}
.style3 {color: #000000; font-size: 9px; }
-->
</style>
</head>
<body>
<table width="699" border="0">
<tr>
<td colspan="2"> <div align="center"><span class="style2"> ใบเสร็จรับเงิน / ใบกำกับภาษี RECEIPT / TAX INVOICE </span> <em>ต้นฉบับลูกค้า</em></div></td>
</tr>
<tr>
<td width="456" class="style3"><span class="style2">บริษัท สมุย เคเบิ้ล ทีวี จำกัด</span></td>
<td width="233" class="style2"><span class="style3">เลขประจำตัวผู้เสียภาษีอากร 3 821 018544 </span></td>
</tr>
<tr>
<td class="style3">45/1-2 หมู่ 1 ตำบลแม่น้ำ อำเภอเกาะสมุย จังหวัดสุราษฎร์ธานีโทร.(077) 425004-5 Fax ต่อ 18 </td>
<td class="style2">เลขที่</td>
</tr>
<tr>
<td class="style3">นาม Name/ที่อยู่ Address</td>
<td class="style2">วันที่</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<table width="692" border="0">
<tr>
<td width="10"> </td>
<td width="277"><div align="center">Description</div></td>
<td width="50">unit</td>
<td width="70">unit/price</td>
<td width="70">total</td>
</tr>
<tr>
<td>1</td>
<td><?php echo $row_Recordset1['BilDetProName']; ?></td>
<td><?php echo $row_Recordset1['BilDetQua']; ?></td>
<td><?php echo $row_Recordset1['BiDelPrice']; ?></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" class="style2">Remark</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4"> </td>
<td> </td>
</tr>
</table>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.