I have the following question how can I insert code php
into javascript
, ie I have a graph made in JS
and I want it to be based on data from my database, like putting php
within js
or do I have to fetch the database information from JS?
For example the below I have the part of the code where you want to fill in the points on the Y axis and I intend instead to have value fill with values from the database I already made the select but how do I put instead of values a while loop that cycles through a database table and enter the values.
Date: [1.5000,15000,18394,18287,28682,31274,33259,25849,24159,32651,31984,38451]