|
 |
|
หาค่าจำนวนเงิน ที่เป็นtext[] ผมต้องการนำผลคูณของ จำนวน กับ ราคา มาใส่ไว้ที่จำนวนเงิน แต่มันเป็น textbox[] ที่เป็น Array |
|
 |
|
|
 |
 |
|
<?
$qty=array('1','2','3','4',);
$price=array('10','20','30','40',);
?>
</p>
<table border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFCC00">
<tr align="center">
<td><span class="style4">ลำดับ</span></td>
<td><span class="style4">รหัสสินค้า</span></td>
<td><span class="style4">จำนวน</span></td>
<td><span class="style4">ราคา/หน่วย</span></td>
<td><span class="style4">ราคา</span></td>
<td width="25"> </td>
</tr><? for($i=0;$i<count($qty);$i++){?>
<tr align="center">
<td><?=$i;?></td>
<td><input name="textfield" type="text" size="8" value="" /></td>
<td><input name="textfield2" type="text" size="3" value="<?=$qty[$i];?>"/></td>
<td><input name="textfield3" type="text" size="8" value="<?=$price[$i];?>"/></td>
<td><input name="textfield4" type="text" size="8" value="<? echo $qty[$i]* $price[$i];?>"/></td>
<td> </td>
</tr><? }?>
<tr align="center">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
|
 |
 |
 |
 |
Date :
2009-04-04 13:25:02 |
By :
arsachi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากครับจะลองนำไปทำดู
|
 |
 |
 |
 |
Date :
2009-04-04 23:06:27 |
By :
xDKx |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|