这是我的数据库示例: 带有与产品表相关的 ProID 的orderdetails表
| ProID | OrderID | OrderQuantity | OrderPrice |
| 93 | 17 | 1 | 150 |
| 16 | 18 | 1 | 100 |
| 93 | 19 | 3 | 450 |
| 93 | 17 | 1 | 150 |
Run Code Online (Sandbox Code Playgroud)
产品表
| ProID | ProPicture | ProName | ProPrice |
| 93 | ./a.jpg | Iphone | 150 |
| 16 | ./b.jpg | Nokia | 100 …Run Code Online (Sandbox Code Playgroud) 如何将所选项目存储listbox到新数组中,就像我们选择项目然后执行按钮操作一样,感谢您提供高级帮助.
string[] domains = new string[listBox1.Items.Count];
for (int i = 0; i < listBox1.Items.Count; i++)
{
domains[i] = listBox1.SelectedIndices[i].ToString();
}
Run Code Online (Sandbox Code Playgroud) 我将该代码包含在main.php中,并在此代码的最后一行收到语法错误"unexpected $ end",即使我把}用于while循环.请帮忙
<?php
while($row=mysql_fetch_array($rs))
{
?>
<div class="center_title_bar"><?php echo $row['ProName']?></div>
<div class="prod_box_big">
<div class="top_prod_box_big"></div>
<div class="center_prod_box_big">
<?php
echo"<div class='product_img_big'>";
echo"<a href='javascript:popImage('".$row['ProPicture']."','".$row['ProName']."') title='".$row['ProName']."'><img src='".$row['ProPicture']."' alt='' border='0' /></a>";
echo"</div>";
echo"<div class='details_big_box'>";
echo"<div class='product_title_big'>'".$row['ProName']."'</div>";
echo"<div class='specifications'>'".$row['ProInfo']."'<br />";
echo"Tr?ng thái: <span class='blue'>";
if($row['ProQuantity'])
{
echo"Còn hàng";
}
else {
echo"H?t hàng";
}
echo"</span><br />";
echo"B?o hành: <span class='blue'>".$row[ProWarranty]." tháng</span><br />";
echo"</div>";
echo"<div class='prod_price_big'><span class='price'>".number_format($row['ProPrice'],0,',','.')." VND</span></div>";
echo'<a href="?options=giohang&action=add&item='.$row[ProID].'" class="addtocart">Thêm vào gi?</a>';
?>
<a href="location:history.back()" class='compare'>Quay l?i</a>
</div>
</div>
</div>
<div class="bottom_prod_box_big"></div>
}
Run Code Online (Sandbox Code Playgroud)
解析错误:语法错误,意外的$ end …