Array problem....
| From: | Jas | Date: | Wed, 10 Dec 2003 23:21:18 +0000 |
| Subject: | Array problem.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-172402@lists.php.net to get a copy of this message | ||
Not very good at arrays so I figured i would look here....
<?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)) {
print $sub;
print "<br>";
print $msk;
print "<br>";
print $dns01;
print "<br>";
print $dns02;
print "<br><br>"; }
?>
This pulls each row form a table and assigns a variable to each field, 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...
}
I have been scouring the various functions and as of yet have yet to accomplish what I need. Any help would be great.
Thanks in advance,
jas