document.write('<div class="php" style="font-family: monospace;"><br />');
document.write('<span style="color: #000000; font-weight: bold;">&lt;?php</span><br />');
document.write('<span style="color: #808080; font-style: italic;">/*This small script uses the rand() function in PHP to randomly generate desired content. This script is simply an example of how it may be used to generate content. In this script, a certain quote will be displayed depending on the number that is returned by the rand() function.*/</span><br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//rand(1, 3) means that the random number will range from 1 to 3.</span><br />');
document.write('<span style="color: #0000ff;">$number</span> = <a target="_blank"&nbsp; href="http://www.php.net/rand"><span style="color: #000066;">rand</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;<br />');
document.write('<br />');
document.write('<span style="color: #808080; font-style: italic;">//These if/else if statements return strings according to the number that was generated.</span><br />');
document.write('<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$number</span>==<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('<a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;This is the string that will be displayed when the random number is 1!&quot;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$number</span>==<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('<a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;Since the number was 2, this string was returned!&quot;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$number</span>==<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />');
document.write('<a target="_blank"&nbsp; href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;The number this time was 3!&quot;</span>;<br />');
document.write('<span style="color: #66cc66;">&#125;</span><br />');
document.write('<br />');
document.write('<span style="color: #000000; font-weight: bold;">?&gt;</span><br />');
document.write('&nbsp;</div>');
document.write('');
document.write('This may seem somewhat basic, but it may be used to do more advanced things such as displaying banners on sites, playing random music clips, or any other use that you could think of. Feel free to ask any questions that you might have. ');
document.write('<br />&nbsp;<br /><div style="font-size: 12px">Brought to you by the community at <a href="http://www.bytemycode.com/snippets/snippet/172/1/" target="_blank">byteMyCode</a>.</div>');
