好的,我有一个问题,我有这个代码,我将在下面列出.我需要使偶数行为浅蓝色,奇数为白色.现在它没有出现所以我假设我做错了.现在我需要在其中执行命令,以便行看起来像我需要它的方式吗?
<html>
<head>
<title> Html Tables</title>
</head>
<body>
<?php
echo "<table width=\"50%\" cellpadding=\"2\" cellspacing=\"2\" border=\"1\">";
echo "<tr bgcolor=\"#FFFFFF\">";
$rowcount=0;
for($x=1;$x<=12;$x++){
echo " <td align=\"center\" style=\"width:100px\">".$x."</td>\n";
if ($x%4==0) {
if ($rowcount%2==0){
echo "</tr>";
echo "<tr bgcolor=\"#5CCDC9\">\n";
}
else{
echo "</tr>";
echo "<tr bgcolor=\"#FFFFFF\">\n";
}
$rowscount++;
}
}
echo "</tr>";
echo "</table>";
?>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
好吧,我在阅读一些事情后想要更好地理解这一点,这是我的新代码
<html>
<head>
<title> Html Tables</title>
<style type=<\"text/css\">
.even { bgcolor:#5CCDC9; }
.odd { bgcolor:#FFFFFF; }
</style>
</head>
<body>
<?php
echo "<table width=\"50%\" cellpadding=\"2\" cellspacing=\"2\" border=\"1\">";
echo …Run Code Online (Sandbox Code Playgroud) 我正在阅读这个错误
解析错误:在第11行的C:\ wamp\www\about.php中解析错误,意外的'>'
这是我的代码:
<?php
session_start();
include ("include/header.php");
if (!isset($_SESSION['name'])){;
header("Location:includeindex.php");
exit;
}
else{
TopNavigation("about Me -ECA236","About Me",$_SESSION['name']);
echo "<p>Here is a little about me. I am a mother of twin girls who are 9 </p>
echo "<p>I been married for 5 years but been with my husband for 11 years </p>
echo "<p>I am attending college for Computer Programming and Database Mangament </p>
echo "<p>After I get done with this degree I am want to go back for Web …Run Code Online (Sandbox Code Playgroud)