Can you nest JavaScript in PHP?
<p>I found this ad rotator script and I want to nest JavaScript inside like this below. I get errors thrown how would I accomplish this.</p>

<pre><code>&lt;?php 
// random number 1 - 100 $result_random = rand(1, 100); 

// if result less than or equal 70, display ad1 (70%) 
if($result_random &lt;= 70){ 
  echo "&lt;script type='text/javascript' src='http://myads.com'&gt;&lt;/script&gt;"; 
} 
// if result less than or equal 90, display ad2 (20%) 
else if($result_random &lt;= 90){ 
  echo "&lt;script type='text/javascript' src='http://myads.com'&gt;&lt;/script&gt;";
} 
// if result less than or equal 100, display ad3 (10%)
else { 
 echo "&lt;script type='text/javascript' src='http://myads.com'&gt;&lt;/script&gt;"; 
} 
</code></pre>
