سلام
توی کد زیر :
توی این قسمت :
این خطا رو میده :
لطفا کد رو اصلاح کنید(پست اصلاح شد).
توی کد زیر :
کد پیاچپی:
<?php
$select = mysql_query("SELECT distinct `name` FROM `createfood` WHERE `by`='$by'");
$options = array();
while( $rows = mysql_fetch_assoc($select) )
$options[] = '<option value="' .$rows['name']. '">' .$rows['name']. '</option>';
$content = '';
$count = isset($_GET['number']) ? $_GET['number'] : 1;
for($i=1; $i<=$count ; $i++)
{
$content .= '
<tr>
<td align="center" bgcolor="#F9F9F9" width="229">
<input type="text" name="comment[]" size="40" class="in" dir="rtl" />
</td>
<td align="right" bgcolor="#F9F9F9" width="129">
<input type="text" name="sum[]" size="21" class="in" dir="ltr" onkeyup="this.value=num2money(this.value);" />
</td>
<td align="center" bgcolor="#F9F9F9" width="135">
<input type="text" name="price[]" size="23" class="in" onkeyup="this.value=num2money(this.value);" />
</td>
<td align="right" bgcolor="#F9F9F9" width="64">
<input type="text" name="count[]" size="8" class="in" />
</td>
<td align="center">
<font size="2">
<select size="1" name="footname[]" dir="rtl" style="font-family: Tahoma; color: #333333; font-size: 9pt" class="btn">
<option selected>نام غذا </option>
'. join("\n\t\t\t\t\t\t", $options) .'
</select>
</font>
</td>
<td align="center" bgcolor="#F9F9F9" width="47">
<font face="Tahoma" size="2" color="#FF6600"><b>' .$i. '</b></font>
</td>
</tr>'; [php]
}
echo '<table border="0" width="100%" cellpadding="3" cellspacing="2">' .$content. '</table>';
unset($content, $options); ?>
توی این قسمت :
کد پیاچپی:
$options[] = '<option value="' .$rows['name']. '">' .$rows['name']. '</option>';
این خطا رو میده :
کد:
Fatal error: Cannot use [] for reading in e:\program files\easyphp1-8\www\zare\operator\form2.php on line 341