-1

[1] https://i.stack.imgur.com/8oJ4C.jpg "html code" [2] https://i.stack.imgur.com/d5Ug0.jpg "php code"

I try to use the variables from php in javascript to generate a chart with them.

2 Answers2

0

Try using an id e.g.

In your html name='someName'>

Then use that ID in your JS.

edy.devs
  • 89
  • 1
  • 9
-1

Use can use something like this:

var data = '<?=$dataFromPhp?>';