Hi. I a a newbie at PHP.
I have two pieces of data which I am retrieving from a database. They are both numerical values.
They are part of a wider data list which is being retrieved from the database and displayed on the web site
Like this :
2007 2008 Difference
John 100 110
Mary 130 120
Ann 96 98
I wnat to be able to calculate, using PHP the Diffference cloumn as each is being displayed. ie to take the 2008 value and the 2007 value for each associated with each name and calculate the difference.
Any thoughts ?
I have two pieces of data which I am retrieving from a database. They are both numerical values.
They are part of a wider data list which is being retrieved from the database and displayed on the web site
Like this :
2007 2008 Difference
John 100 110
Mary 130 120
Ann 96 98
I wnat to be able to calculate, using PHP the Diffference cloumn as each is being displayed. ie to take the 2008 value and the 2007 value for each associated with each name and calculate the difference.
Any thoughts ?