Php 一些?>;显示在“我的页面”中选择的所有标记均已关闭

Php 一些?>;显示在“我的页面”中选择的所有标记均已关闭,php,html,tags,Php,Html,Tags,我在我的页面中遇到了一些麻烦,一些?>?>?>?>?>?>?>?>?>确实出现在我的页面中,似乎是谎言代码没有被解释,但所有都是封闭的,我不知道它从何而来 下面是我的代码 <?php //For weight change $down_icon = 'images/thumb_down.gif'; $same_icon = 'images/cool.gif'; $up_icon = 'images/thumb_up.gif'; $comment_icon = 'images/noteboo

我在我的页面中遇到了一些麻烦,一些?>?>?>?>?>?>?>?>?>确实出现在我的页面中,似乎是谎言代码没有被解释,但所有都是封闭的,我不知道它从何而来

下面是我的代码

<?php
//For weight change
$down_icon = 'images/thumb_down.gif';
$same_icon = 'images/cool.gif';
$up_icon = 'images/thumb_up.gif';
$comment_icon = 'images/notebook.gif';

//DB Values for icons
$status_icons[0] = $down_icon;
$status_icons[1] = $same_icon;
$status_icons[2] = $up_icon;
?>
<style>
    .fif {display: inline-block; 
      padding-left:5px;
      padding-right: 5px; 
/*    box-shadow: 8px 8px 0px #aaa;
          border-width:1px;
            border-style:dashed;
            border-color:black;}*/
    }
</style>
<table class="noborder">
    <tr><td>
            <div class="uibutton-group">
                <a class="uibutton" href="index.php?p=history&day=1">Lundi</a>
                <a class="uibutton" href="index.php?p=history&day=2">Mardi</a>
                <a class="uibutton" href="index.php?p=history&day=3">Mercredi</a>
                <a class="uibutton" href="index.php?p=history&day=4">Jeudi</a>
                <a class="uibutton" href="index.php?p=history&day=5">Vendredi</a>
                <a class="uibutton" href="index.php?p=history&day=6">Samedi</a>
                <a class="uibutton" href="index.php?p=history&day=7">Dimanche</a>
            </div>  
        </td>
        <td><b>Derniers jours en arrière </b> </td>
        <td><div class="uibutton-group">
                <a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=30">30</a>
                <a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=60">60</a>
                <a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=90">90</a>
                <a class="uibutton" href="index.php?p=history&day=<?php echo $_GET['day'] ?>&farback=120">120</a>
            </div></td>
    </tr>
</table><p><br></p>
<div class="maindivforexos" style="width:100%;display:inline-block">
    <?php
    if (!isset($_GET['day'])) {
    $_GET['day'] = 1;
    }
    if (isset($_GET['farback'])) {
    $farback = $_GET['farback'];
    } else {
    $farback = 28;
    }
    $query = "SELECT `record` FROM `workouts` 
          WHERE `workouts`.`day_number`='1' 
          AND `workouts`.`user` = {$_SESSION['userid']} 
          AND  `workouts`.`record` >= SUBDATE(now(),INTERVAL {$farback} day) 
          GROUP BY `record` ";
    $result = mysql_query($query);

    if (!mysql_num_rows($result)):
    ?>
        <div class=warning>Il n'y a pas d'enregistrements pour ce jour.</div>
    <?php
    else:
    while ($cr = mysql_fetch_array($result)):
        ?>
        <div style="width:200px"  class="fif"><table style="width:100%">
            <tr class="fbgreybox">
            <td colspan="3" style="text-align: center;font-weight: bold">
                <img src="images/calendar_2.png"> Séance du : <?php echo date('d-m-Y', strtotime($cr['record'])) ?>
            </td>
            </tr>
            <?php
            $sql = "SELECT `exercise` FROM `workouts` WHERE `record` = '{$cr['record']}' AND `user`= {$_SESSION['userid']} GROUP BY `exercise`";
            $result = mysql_query($sql);
            while ($exo = mysql_fetch_assoc($result)) :
            ?>
                <tr class="fbinfobox">
                <td colspan="3" style="text-align: left">
                    <img src="images/Sport-dumbbell.png"> <?php echo exerciseName($exo['exercise']) ?>
                </td>
                </tr>
                <tr>
                <td style="text-align: center;font-weight: bold">Séries</td>
                <td style="text-align: center;font-weight: bold">Reps</td>
                <td style="text-align: center;font-weight: bold">Poids</td>
                </tr>
            <?php
            $rqt = "SELECT `set_number`, `reps`, `weight` FROM `workouts` WHERE `exercise` = {$exo['exercise']} AND `record` = '{$cr['record']}' AND `user` = {$_SESSION['userid']} ORDER BY `set_number`";
            $result2 = mysql_query($rqt);
            while ($detail = mysql_fetch_assoc($result2)):
                ?>
                <tr>
                <td>
                    Série <?php echo $detail['set_number'] ?>
                </td>
                <td>
                    <?php echo $detail['reps'] ?>
                </td>
                <td>
                    <?php echo $detail['weight'] ?>
                </td>
                </tr>
                ?>

                <?php
            endwhile;
            endwhile;
            ?>
        </table>
        </div>
        <?php
    endwhile;
    endif;
    ?>
</div>

.fif{显示:内联块;
左侧填充:5px;
右侧填充:5px;
/*盒影:8px 8px 0px#aaa;
边框宽度:1px;
边框样式:虚线;
边框颜色:黑色;}*/
}
我们的工作进展顺利

杜塞恩斯:
代码中似乎有一个额外的结束PHP标记

<?php echo $detail['weight'] ?>
</td>
</tr>
?> <----------here


?>while循环中有一个“?>”。请看:?>删除这个额外的“?>”哦,非常感谢你,我没有看到,因为我正在重构代码,我从昨天开始就在搜索,几秒钟后你就找到了,谢谢你,在循环中通常会发现很多“异常”。很高兴我能帮忙。:)