Is it possible to display HTML from within a PHP class?
<p>Is it possible to write a form and javascript validations using class and functions. Her is my code sample.</p>

<pre><code>class files{

  function displayhtml(){?&gt; 

select name="df" onchange=analert(this.value);&gt;

for($i=0;$i&lt;10;$i++){?&gt;

         &lt;option value="&lt;?php echo "$i"; ?&gt;"&gt;&lt;?php echo "$i"; ?&gt;&lt;/option&gt;&lt;?php
        }?&gt;&lt;/select&gt;&lt;?php
  }
}
echo files::displayhtml();
?&gt;
</code></pre>

<p>On change event i need to alert the value selected in dropdown, how will i write javascript in this same class. ???  </p>
