PHP within HTML
<p>PHP is a server side language – but my current request is to have PHP at client (browser) side language. Let me explain – I will have a .html file which in some way have instruction to load a .php file. This .php file would interact with DB (or create a dynamic Java Script). Later this data would be dynamically displayed on the web html file using PHP functionality. Is the same possible? Can you please provide an example of same?  What is the HTML include command to include a PHP files.</p>

<p>Is this possible – however if same is possible what is the HTML tags to do so?</p>

<p>Let me explain via some examples:</p>

<p>A.html</p>

<pre><code>&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;ul&gt;  
inlude &lt;--"phpfile.php"--&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Now "phpfile.php" will have</p>

<pre><code>&lt;?php for($i=1;$i&lt;=5;$i++){ ?&gt;
&lt;li&gt;Menu Item &lt;?php echo $i; ?&gt;&lt;/li&gt; 
&lt;?php } ?&gt;
</code></pre>

<p>So finally the HTML file would give to the user:</p>

<pre><code>•Menu Item 1
•Menu Item 2
•Menu Item 3
•Menu Item 4
•Menu Item 5
</code></pre>

<p>Here is my real requirement. I have to implement HighChart Column Drill down chart in a web page. Now that is statically build using JS:</p>

<p>References:</p>

<p><a href="http://jsfiddle.net/hfrntt/NULTY/3/" rel="nofollow">Example 1</a>
<a href="http://www.highcharts.com/demo/column-drilldown" rel="nofollow">Example 2</a></p>

<p>I am trying to create a dynamic Nth level column drilldown Highchart. Since drilldown 'data' and its tags are suppose to be dynamic I need to generate a dynamic JS. Is the same possible via PHP</p>

<p>We have PHP installed in our web host and doing an AJAX call will not solve as I need HighChart JS script to be dynamic . AJAX call can give me data but can I have the JS script made as dynamic. Please see the example references in the question. It has a 'data' 'drilldown' JS array tags for your perusal.</p>

<p>For better clarity I am adding the HighChart data array that needs to be dynamic here:</p>

<pre><code>   var colors = Highcharts.getOptions().colors,
      categories = ['MSIE', 'Firefox', 'Chrome', 'Safari', 'Opera'],
      name = 'Browser brands',
      level = 0,
      data = [{
            y: 55.11,
            color: colors[0],
            drilldown: {
               name: 'MSIE versions',
               categories: ['MSIE 8.0', 'MSIE 6.0', 'MSIE 7.0', 'MSIE 9.0'],
               level: 1,
               data: [{
                   y: 33.06,
                   drilldown: {
                       level: 2,
                       name: 'drilldown next level',
                       categories: ['a', 'b', 'c'],
                       data: [23,54,47],
                       color: colors[0]
                   }
               }, 10.85, 7.35, 2.41],
               color: colors[0]
            }
         }, {
             y: 21.63,
            color: colors[1],
            drilldown: {
               name: 'Firefox versions',
               categories: ['Firefox 3.6', 'Firefox 4.0', 'Firefox 3.5', 'Firefox 3.0', 'Firefox 2.0'],
               data: [13.52, 5.43, 1.58, 0.83, 0.20],
               color: colors[1]
            }
         }, {
            y: 11.94,
            color: colors[2],
            drilldown: {
               name: 'Chrome versions',
               categories: ['Chrome 10.0', 'Chrome 11.0', 'Chrome 8.0', 'Chrome 9.0', 'Chrome 12.0',
                  'Chrome 6.0', 'Chrome 5.0', 'Chrome 7.0'],
               data: [9.91, 0.50, 0.36, 0.32, 0.22, 0.19, 0.12, 0.12],
               color: colors[2]
            }
         }, {
            y: 7.15,
            color: colors[3],
            drilldown: {
               name: 'Safari versions',
               categories: ['Safari 5.0', 'Safari 4.0', 'Safari Win 5.0', 'Safari 4.1', 'Safari/Maxthon',
                  'Safari 3.1', 'Safari 41'],
               data: [4.55, 1.42, 0.23, 0.21, 0.20, 0.19, 0.14],
               color: colors[3]
            }
         }, {
            y: 2.14,
            color: colors[4],
            drilldown: {
               name: 'Opera versions',
               categories: ['Opera 11.x', 'Opera 10.x', 'Opera 9.x'],
               data: [1.65, 0.37, 0.12],
               color: colors[4]
            }
         }];
</code></pre>

<p>Also the final page would not be a .php page, I am looking for a way to make the 'data' array either of 1,2,3,4 ... Nth element JS array</p>
