Artenis Posted September 8, 2008 Report Share Posted September 8, 2008 Doma ir tāda, ka es pievienoju input laukus cik vajag: <input onChange="funkcija...." name="daudzums[1]" type="text" value=""> <input name="cena[1]" type="text" value=""> <input name=summa[1] type="text" value=""> <input onChange="funkcija...." name="daudzums[2]" type="text" value=""> <input name="cena[2]" type="text" value=""> <input name=summa[2] type="text" value=""> Doma ir tāda, kā, lai pasaku, ka labojot daudzums[1], ta sautomātiski sareizināsies ar cena[1] un izvadīs rezultātu iekš summa[1] un ar daudzums [2] tā pat, konkrētajā array... Ceru, ka domu sapratāt! :)... Iepriekš paldies!! Link to comment Share on other sites More sharing options...
andrisp Posted September 8, 2008 Report Share Posted September 8, 2008 Izdrukājot tos inputs, uzreiz saliec ID klāt -> daudzums_1, cena_1, summa_1; daudzums_2, cena_2 .. utt Tad ar tiem varēsi viegli operēt. Link to comment Share on other sites More sharing options...
SkaKri Posted September 8, 2008 Report Share Posted September 8, 2008 (edited) $daudzums[1]*$cena[1] http://lv2.php.net/manual/en/ref.math.php Edited September 8, 2008 by SkaKri Link to comment Share on other sites More sharing options...
Artenis Posted September 8, 2008 Author Report Share Posted September 8, 2008 Kā sareizināt to jau saprotu! :)... Oki danke par ID variantu! :) Link to comment Share on other sites More sharing options...
Recommended Posts