php3-list | 199901
Date: 01/26/99
- Next message: Joshua S. Freeman: "[PHP3] suddenly, e-comerce! (long-ish)"
- Previous message: Joey Smith: "Re: [PHP3] Path"
- Next in thread: Colin Viebrock: "RE: [PHP3] Array declartation"
- Reply: Colin Viebrock: "RE: [PHP3] Array declartation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is is possible to assign values to an array using varibles?
$temp = 19901
$totals[$temp] = 0;
then do something like :
mysql_result($fdata= <email protected>($result,$i,$fieldname);
if ($fdata==$currentcode) {
$fieldname=mysql_field_name($result, 1);
$fdate=mysql_result($result,$i,$fieldname);
$fieldname=mysql_field_name($result, 4);
$fdata=mysql_result($result,$i,$fieldname);
$totals[$fdate] = $fdata + $totals[$fdate];
}
What I hope this does is takes a range of dates, creates an array of those dates
and then assigns values to those array places that the date in $fdate matches.
Does this make sense?
Should this work?
I haven\'t put the full code in as it is pretty chunky, but $temp is assigned
the
date variable which should change each time through a loop.
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Joshua S. Freeman: "[PHP3] suddenly, e-comerce! (long-ish)"
- Previous message: Joey Smith: "Re: [PHP3] Path"
- Next in thread: Colin Viebrock: "RE: [PHP3] Array declartation"
- Reply: Colin Viebrock: "RE: [PHP3] Array declartation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

