|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
PHP: create tables w/ loop & iterate functions ?
I'm trying to get the concept of the loop down. I'm creating a crude budget tool where I can compare expenses to income.
1. I need to create table rows with a loop 2. need to have a loop check if the value is_numeric (if not echo "value ! num" 2. need to have a loop add the values for each "amount" entered to get a "Total". I've been able to create the table rows. I haven't figured out how to get the loop to add the money values entered under "amount". My other problem (of lesser priority) is that the values submitted and displayed change once I submit the form (to itself). Usually the fields get filled with the first value entered on the first row. i.e. if ammount val 100 entered on first row and val 30 entered on second row, the total is 130 BUT the number displayed are (for each row instance) "100"The numbers are supossed to remain there once the form reloads. Those are the main tasks. I know that there has to be a way to loop the entire task. I'm just not entirely sure on how to apply the loop tool for all these instances at for each iteration. Any tips would be greatly appreciated. Thank you. DM -------------- PHP Code:
|
|
#2
|
||||
|
||||
|
I am assuming you have answered your questions due to your newer posting in the PHP Forum?
__________________
--------------------- -- SilkySmooth -- --------------------- Proxy | Little Directory |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > PHP: create tables w/ loop & iterate functions ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|