![]() |
| ||
| Loop Problem,plz help $totalCost=0; while($row = $result->fetch_assoc()) { $totalCost+=$row["price"]; ------------------------------ --->why the $totalCost always is 0? |
| ||
| Re: Loop Problem,plz help does row["price"] have a value in it? Php let you assign empty array items. Try add echo $row['price'] to the loop and make sure that it is not empty. |
| All times are GMT -4. The time now is 2:45 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC