我有一個表格,名爲$row['seuil_pil']
,它只包含數字。我想將這些數字增加一定數量,但不起作用。簡單數學表格PHP
這裏是我的代碼:
$roof=0.12;
$seuil_haut= array_product(($row['seuil_pil']*$roof) + $row['seuil_pil']);
OR
$seuil_haut= array(($row['seuil_pil']*$roof) + $row['seuil_pil']);
OR
$seuil_haut= ($row['seuil_pil']*$roof) + $row['seuil_pil'];
OR
foreach ($row['seuil_pil'] as $seuil_haut[])
{
$seuil_haut[] = ($roof * $row['seuil_pil'] + $row['seuil_pil']);
}
你有沒有想過使用foreach循環呢? – rbr94
是的,但我認爲我沒有理解它 – elianero
它是一維數組嗎? '$ row ['seuil_pil']'的內容是怎樣的? – rbr94