我有一種感覺,我會爲此而罵,但這是問題。PHP foreach循環與顯示MySQL結果時的連續數字
$seq_numbers = range('1', '24');
foreach($seq_numbers as $seq_number)
{
Bullet <?php echo $seq_number;?>
// (this successfully creates - Bullet 1, Bullet 2, etc. -
below is the problem.
<?php echo $db_rs['bullet_($seqnumber)'];?>
} // this one doesn't work.
我已經試過 用花括號{}
我基本上有一個名爲除了在年底(,BULLET_1,BULLET_2,BULLET_3等)的數量相同的數列,並希望使用循環獲取結果。
給定的代碼可能會給出一個語法錯誤。使用帶有PHP標籤的PHP標籤是沒有意義的。 –