Regarding javascript:
I use client side to echo out the income of a value each hour from PHP. Finding out how much the value would increase each second.
1 234 567,89
There is also this further down in the body.
var resource1 = <? echo $this->user->maxincome($resourceincome[0]);?>;
var persec1 = resource1/ (60*60);
Based on Wood: <span id="datawood" data-income="<? echo $this->user->maxincome($resourceincome[0]);?>"><? echo number_format($village->wood); ?> / <? echo number_format($maxstorage);?>
how can I increase the value and data-income value of persec1
?
Below is what I have tried but the 0.25 won't be added to the value.
datawood
This is to increase the value based on resource1, each sec, based on resource1 variable that holds the raise each hour
Regarding the PHP:
If I have a variable that holds how much income it is per hour, what would the best way of sending this to the user? This need to be every second so a cron job may be to slow.