Re: array ..... stuck pretty bad

From: Date: Mon, 28 Apr 2003 15:40:38 +0000
Subject: Re: array ..... stuck pretty bad
Groups: php.windows 
Request: Send a blank email to php-windows+get-19678@lists.php.net to get a copy of this message
hey toby - very happy to see you`re getting some use out of that code scrambler I sent you. -- cam ======= At 2003-04-28, 12:53:00 you wrote: ======= >hay guyz > >stuck with a rather silly array since this mornnin > > >------------------------------------- >rprt_qrt_bi_yr_qry.php >------------------------------------- >echo("<br>rprt_spn== $rprt_spn<br>"); >$frm_mon = $_GET['frm_mon']; >$frm_yr = $_GET['frm_yr']; >$to_mon = $_GET['to_mon']; >$to_yr = $_GET['to_yr']; >$tbl = $tbl_ftchd; > >echo("<br> span id == ".$rprt_spn ."<br>"); > > if($rprt_spn == 2){ > > $spn = 3; > echo("<br> span== ".$spn ."<br>"); > > } > > else if($rprt_spn == 3){ > > $spn = 6; > echo("<br> span== ".$spn ."<br>"); > > } > > else if($rprt_spn == 4){ > > $spn = 12; > echo("<br> span== ".$spn ."<br>"); > } > > > //$rprt_dt_arr[] = ""; > > echo("<br> span== ".$spn ."<br>"); > for($loop_mon=$frm_mon; $loop_mon<=$to_mon ; $loop_mon++){ > > > > $ftch_rprt_data_qry = "select count($pk_id_fld) from $tbl > where month(date) = $loop_mon > and year(date)=$frm_yr "; > >$ftch_rprt_data_qry_rzlt_hndlr = mysql_query($ftch_rprt_data_qry) > or die("qry $ftch_rprt_data_qry failed ! > da tbl must xixt in da db 2 b played vid ! ! ! !"); > >$ttl_rkz_ftchd = mysql_num_rows($ftch_rprt_data_qry_rzlt_hndlr); > > > >echo("<br> ftch_rprt_data_qry &nbsp; $ftch_rprt_data_qry <br>"); > > >$ftch_rprt_data = mysql_fetch_row($ftch_rprt_data_qry_rzlt_hndlr); > >$rprt_data= $ftch_rprt_data[0]; >echo(" rprt data ftchd : &nbsp;". $rprt_data. " <br> <br>"); > > >//$rprt_dt_arr[$loop_mon] = $rprt_dt_arr[$loop_mon].",".$rprt_data; >$rprt_dt_arr = $rprt_dt_arr.",".$rprt_data; > >$go_str = "rprt_data=".$rprt_dt_arr."&frm_mon=".$frm_mon. >"&frm_yr=".$frm_yr."&to_mon=".$to_mon."&to_yr=".$to_yr. >"&spn=".$spn."&frm_nme_ftchd=".$frm_nme_ftchd; > > >echo("<br> go str".$go_str."<br>"); >echo($rprt_dt_arr); > } > > >//$rprt_dt_arr = $rprt_data[0].$rprt_data[1].$rprt_data[2]; > >// echo("prt_dt_arr &nbsp; $rprt_dt_arr"); > > >echo("<a href='go.php?$go_str'>go</a>"); > > > > > >----------------------------------- > >now the problems are: > >1. i have passed the $rprt_dt_arr someway to page go.php with the >$go_str thinggy i couldnt pass it through an array > >2. when i catch this $rprt_dt_arr on go.php i get a csl ofcorse >i try to explode it , splitt it and tokenize it but it just doent >work >nuthing seems to be working > > >3. i want to pass the goddamed sting as an array and catch it as one >on the next page coz i have to turn all the catched array values to a >graph :'( > > > > >------------------------------------ >$newStr=""; >//Replacing \n with <br> >$tok = strtok($rprt_data,","); >while ($tok) { > $newStr = $newStr.$tok."<br>"; > $tok = strtok("\n"); > } > //echo ($body); > echo ($newStr."<br>"); > > >$rprt_data_nu = explode(",", $rprt_data); > >echo($rprt_data_nu); > > >----------------------------------------------- > > > > >can and will someone plz help >thnx a mill >stuck as uzuall >toby ..... > > >__________________________________________________ >Yahoo! Plus >For a better Internet experience >http://www.yahoo.co.uk/btoffer > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php = = = = = = = = = = = = = = = = = = = = Best regards. Cam Dunstan cam@norex.com.au 2003-04-29

« previous php.windows (#19678) next »