You can do that with some if() but, since there's only one variable to test,
a switch() statement is more "elegant" 🙂
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><?php include "header.php";?></td>
</tr>
<tr>
<td width="27%" height="104" rowspan="2" bgcolor="#999999"></td>
<td height="38">
<a href="index.php?x=menu1">menu1</a> |
<a href="index.php?x=menu2">menu2</a> |
<a href="index.php?x=menu3">menu3</a> |
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<?PHP
$x = $_REQUEST["x"];
switch ($x)
{
case "menu1":
$news = "temp_news.php";
$main = "temp_main.php";
break;
case "menu2":
$news = "temp_news2.php";
$main = "temp_main2.php";
break;
case "menu3":
$news = "temp_news3.php";
$main = "temp_main3.php";
break;
}
print "<td height=\"86\">";
include $news;
print "</td>";
print "<td>";
include $main;
print "</td>;
?>
</tr>
<tr>
<td><?php include "temp_info.php";?></td>
<td><?php include "temp_footer.php";?></td>
</tr>
</table>
And if you want, you can delete any test, like that :
<?PHP
$x = $_REQUEST["x"];
// Get the number in "menu1", "menu2", "menu3", etc.
// num = 1, 2, 3, etc.
$num = substr($x,4,1);
// Concatenate the number we get with script's names
$news = "temp_news$num.php";
$main = "temp_main$num.php";
print "<td height=\"86\">";
include $news;
print "</td>";
print "<td>";
include $main;
print "</td>;
?>