title: Pass php variable to use in html script
body: <p>This is my page and I want to pass my php variable witch is number from my sql database to html script function. If i replace values with anything it ruin everything. If I fetch data from input it works fine. Sql part work and I can display data through php echo but i cant pass it to html script function.
  I use template chart to display my data from mysql on my webpage. All i need to do is pass my php values (that part works) to .myfunc on the bottom. In other words I need to change myValues, and myValues2 with my php values (that part i didnt figure up)</p>
  
  <pre><code>&lt;?php
  $db_host = 'localhost'; // Server Name
  $db_user = 'root'; // Username
  $db_pass = ''; // Password
  $db_name = 'esp8266_baza'; // Database Name
  
  $conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
  if (!$conn) {
      die ('Failed to connect to MySQL: ' . mysqli_connect_error());  
  }
  
  $sql = 'SELECT vrijeme_unosa, temp, hum from temp_hum where p_key = (SELECT MAX(`p_key`) FROM `temp_hum`)';
  
  $query = mysqli_query($conn, $sql);
  
          $row = mysqli_fetch_array($query);
          $ptemp = $row['temp'];
          $phum = $row['hum'];    
  
  if (!$query) {
      die ('SQL Error: ' . mysqli_error($conn));
  }
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;link href="css/meter.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;br&gt;
      &lt;?php echo $ptemp; 
            echo $phum; ?&gt;
      &lt;br&gt;
      &lt;input id="myValues" /&gt;
      &lt;br&gt;
      &lt;input id="myValues2" /&gt;
  &lt;/body&gt;
  &lt;script src="js/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="js/temp.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $("#myValues").myfunc({divFact:2,eventListenerType:'keyup'});
      $("#myValues2").myfunc({divFact:2,eventListenerType:'keyup'});
  
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>