Gacha Posted April 3, 2004 Report Share Posted April 3, 2004 Nu man no shitas pashas lapas postojas nezinaams daudzums JAUT[?] Tur iekavas ir cipars 1.2.3.4.5..... Nu man tos vajag sanjemt un ievietot vienaa stringaa. Dariju kaut kur taa, bet nezinu kā to lai izdara ja man ir register=OFF <_< $cik = $_POST['cik']; $x=1; while($cik>$x){ $data = implode("/0::","$_POST['jaut[$x]']"); $x++; } echo "$data"; Pienjemsim ka postoti ir || jaut1="jaa" jaut2="Nee" jaut3="varbuut" || nu tad tam $data beigaas vajadzetu buut jaa/0::Nee/0::varbuut/0:: Tas implode ir domaats masiiviem - bet man bija ceriba, ka te arii der :D Droshi vien ir jaizmanto kaads FOREACH vai kas tamlidzigs, bet tos es vel nemaku :unsure: Link to comment Share on other sites More sharing options...
Aleksejs Posted April 3, 2004 Report Share Posted April 3, 2004 (edited) $_POST['jaut'][$x] - ja tev jautājumi tiek padoti kāmasīvs.... Ja tie tiek padoti, kā jaut1=aa&jaut2=bb&...&jautN=ii, tad $_POST['jaut' . $x ] Edited April 3, 2004 by Aleksejs Link to comment Share on other sites More sharing options...
Gacha Posted April 4, 2004 Author Report Share Posted April 4, 2004 Nu vinjsh bllauj, ka kaut kas nav $cik = $_POST['cik']; $x=1; while($cik>$x){ $data = implode("/0/::","".$_POST['jaut' . $x ].""); $x++; } echo" <tr> <td><a>$data</a></td> </tr>"; Link to comment Share on other sites More sharing options...
Aleksejs Posted April 4, 2004 Report Share Posted April 4, 2004 Un ko tieši bļauj? Link to comment Share on other sites More sharing options...
Gacha Posted April 4, 2004 Author Report Share Posted April 4, 2004 Warning: implode(): Bad arguments. in Taja rindaa kur ir implode Link to comment Share on other sites More sharing options...
Gacha Posted April 4, 2004 Author Report Share Posted April 4, 2004 Nu cik saprotu tad ar to implode var ievietot tikai ja ir Array! Bet man jau nav. Tapec mekleju f-ciju ar kuru var prosta textu bast iekshaa uz to loopu, bet nevaru atrast. Aleksej tu teici, ja man jautajumi tiek [postoti, kaa masivs tad var izmantot .... Kaavar postot kā masīvu? Tad viss buutu atrisinaats! Link to comment Share on other sites More sharing options...
Aleksejs Posted April 4, 2004 Report Share Posted April 4, 2004 (edited) <input name="jautajums[]" ... value="jā"> <input name="jautajums[]" ... value="nē"> <input name="jautajums[]" ... value="varbūt"> Rezultātā nosūtīsies masīvs: $_REQUEST['jautajums'][0] == "jā" $_REQUEST['jautajums'][1] == "nē" $_REQUEST['jautajums'][2] == "varbūt" Edited April 4, 2004 by Aleksejs Link to comment Share on other sites More sharing options...
Recommended Posts