Jas wrote:

but what I need to do is something like this...

<?php
$sql_subs = mysql_query("SELECT * FROM $t_02",$db)or die(mysql_error()); while(list($id,$sub,$msk,$dns01,$dns02,$rtrs,$rnge) = mysql_fetch_row($sql_subs)) {
$_session['<something to automaticly increment session var>'] = "$sub+$msk+$dns01...
}

How about:


$sql_subs = mysql_query("SELECT * FROM $t_02",$db) or die(mysql_error());
while($row = mysql_fetch_row($sql_subs))
{ $_SESSION['data'][] = $row; }

and you can use $_SESSION['data'][1]['id'], $_SESSION['data'][1]['sub'], etc...

If you really want a "+" delimited string in the session, then you can use:

$_SESSION['data'][] = implode('+',$row);

Then row 1 is $_SESSION['data'][0], row 2 is $_SESSION['data'][1], etc.

Kind of begs the question of why you're doing all this, though????

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to