Help with randomly generating page

I am trying to set a variable to a random value, 1 or 2 (as of now, but may be more options later). And depending on the random value of the variable, I want different content to appear. I can’t figure out what’s wrong with my code… It always produces the first option…


<?PHP

$pageNumber = rand(1,2);
$pageNumber = (string)$pageNumber;

if ("$pageNumber" == "1") {
	echo '
	<body bgcolor="#333333">

	<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
  		<tr>
    		<td align="center" valign="middle">
					<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="556" height="363">
      				<param name="movie" value="temporary.swf">
      				<param name="quality" value="high">
      				<embed src="temporary.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="556" height="363"></embed>
    			</object>
			</td>
  		</tr>
	</table>
	';
} elseif ("$pageNumber" == "2") {
	echo '
	<body bgcolor="#FFFFFF">

	<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
  		<tr>
    		<td align="center" valign="middle">
				<img src="images/beer.jpg">
			</td>
  		</tr>
	</table>
	';
}

?>