I have a database table named weather which has the following data as below :
Place Temperature
Delhi 30
Bangalore 35
Hyderabad 45
Mumbai 41
Now I fetch these data using php and view them to the client in a table.
Now my question how can I dynamically change row font color based on value i.e the temperature. Shall I have to put the function in server side or in client side using javascript.
I have applied the logic in this manner but have not reached the destination.
//here is my logic that i have put in my php file while fetching the data
if (row["Temperature"] > row["MaxTemperature"]){
this.getStyle().color= "red"; }
else{
this.getStyle().color="yellow";}
//I have set a value for MaximumTemperate