title: display weather condtion for events location in php
body: <p>I have developed an event registration website in PHP. When users view the event, I have to show the weather condition of that location. I've got the code from </p>
  
  <p><a href="https://openweathermap.org/widgets-constructor" rel="nofollow noreferrer">https://openweathermap.org/widgets-constructor</a></p>
  
  <p>And Code is here:</p>
  
  <pre><code>&lt;div id="openweathermap-widget-14"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  window.myWidgetParam ? window.myWidgetParam : window.myWidgetParam = [];
  window.myWidgetParam.push({
      id: 14,
      cityid: '1254589',
      appid: '&lt;appId&gt;', // Anonymised appId
      units: 'metric',
      containerid: 'openweathermap-widget-14',
  });
  (function () {
      var script = document.createElement('script');
      script.async = true;
      script.charset = "utf-8";
      script.src = "//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js";
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(script, s);
  })();
  &lt;/script&gt;
  </code></pre>
  
  <p>But I want know how to pass city id dynamically</p>