neo Posted April 6, 2006 Report Share Posted April 6, 2006 Kaa ir iespeejams caur $_GET nodot masiiva saturu? Link to comment Share on other sites More sharing options...
GedroX Posted April 6, 2006 Report Share Posted April 6, 2006 (edited) Izmanto funkcijas serialize, unserialize. Bet uzmanies ar īpaši lieliem masīviem. Neatceros, kāds un kur ir ierobežojums, bet labāk izmantot $_POST. Edited April 6, 2006 by GedroX Link to comment Share on other sites More sharing options...
Blitz Posted April 6, 2006 Report Share Posted April 6, 2006 ja nav parak gars masivs tad var meiginat: foreach ($masivs as $key=>$value) { $_GET[$key]=$value; } kautkaa taa... Link to comment Share on other sites More sharing options...
GedroX Posted April 6, 2006 Report Share Posted April 6, 2006 ja nav parak gars masivs tad var meiginat: foreach ($masivs as $key=>$value) { $_GET[$key]=$value; } kautkaa taa... Un ko iesaki ar daudzdimensionāliem masīviem? =P Link to comment Share on other sites More sharing options...
Blitz Posted April 6, 2006 Report Share Posted April 6, 2006 cilveks nepateica kada tipa masivs vinam ir... nu pienemu ka viendimensionals, nav ko piesieties =P ja kads variants nepalidz tad var meklet citu... Link to comment Share on other sites More sharing options...
neo Posted April 6, 2006 Author Report Share Posted April 6, 2006 paldies Link to comment Share on other sites More sharing options...
andrisp Posted April 6, 2006 Report Share Posted April 6, 2006 Pag, kāda jēga no šī koda ? foreach ($masivs as $key=>$value) { $_GET[$key]=$value; } Link to comment Share on other sites More sharing options...
Kristabs Posted April 6, 2006 Report Share Posted April 6, 2006 (edited) heh, toch. <?php $str = "lapa.php?arr=true"; foreach ($masivs as $key=>$value) { $str .= "&".$key."=".$value; } header("location:{$str}"); ?> Edited April 6, 2006 by Kristabs Link to comment Share on other sites More sharing options...
Delfins Posted April 6, 2006 Report Share Posted April 6, 2006 1.) base64*+serialize - daudzdimensionālie, ja domā GET izmantot.. bet imho.. strings būs pārāk garš un sviestains... 2.) viendimensionalam: ...&masivs1=a&masivs2=b Link to comment Share on other sites More sharing options...
Stopp Posted April 6, 2006 Report Share Posted April 6, 2006 (edited) print_r($_GET); ups, salasīju noteikt, nevis nodot.. Edited April 6, 2006 by Stopp Link to comment Share on other sites More sharing options...
Blitz Posted April 6, 2006 Report Share Posted April 6, 2006 Pag, kāda jēga no šī koda ? foreach ($masivs as $key=>$value) { $_GET[$key]=$value; } es tik taa, pasviedu ideju... Kristabs uzrakstija pilnibaa Link to comment Share on other sites More sharing options...
Stopp Posted April 10, 2006 Report Share Posted April 10, 2006 hmm, manuprāt jau paņemt implodēt to masīvu stringā ar kādu atdalītāju starp elementiem (es parasti lietoju <atdalitajs> vai ko tamlīdzīgu), un tad explode("<atdalitajs>", $_GET['masivs']); Link to comment Share on other sites More sharing options...
nemec Posted April 10, 2006 Report Share Posted April 10, 2006 banans[]=mainiigais&banans[]=mainiigais2&banans[]=mainiigais3 $masivs=$_GET['banans']; Link to comment Share on other sites More sharing options...
Recommended Posts