Another way to accomplish this, preferred in my mind, is:
while ($myrow = db_fetch_array($result)) :
while (list($key,$val) = each($myrow)) :
$$key = $val;
endwhile;
$difference = $budget - $actual;
. . .
endwhile;
Chuck
At 1:34 PM -0700 10/24/01, Jim Lucas wrote:
>one problem on the second script you are trying to use variables that are in
>an array.
>
>if this is where you are talking about
>you need to specify the array[key]
>
>> while ($myrow=DB_fetch_array($result)){
>>
>>
>> $difference = ($budget - $actual);
>
>$difference = ($myrow[budget] - $myrow[actual]);
>
Chuck Theobald, Technology Manager
ERIC Clearinghouse on Educational Management
5207 University of Oregon, Eugene, OR, 97403-5207
800-438-8841
* 541-346-1662 (voice) * 541-346-2334 (fax) * 541-337-0182 (cell) *
* http://eric.uoregon.edu/ * mailto:[EMAIL PROTECTED] *
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]