T_INLINE_HTML? What's wrong with this?

Posted by Charlie Pigarelli on Stack Overflow See other posts from Stack Overflow or by Charlie Pigarelli
Published on 2011-02-08T15:10:39Z Indexed on 2011/02/08 15:25 UTC
Read the original article Hit count: 232

Filed under:
|
|
|
<? switch($data['type']) : ?>
<? case 'log': ?>

    <? while ($row = $data['loop']->fetch()) : ?>
        <table class="t-errors">
            <tr>
                <td>
                    <b>IP:</b> <? echo $row['LogShellIP']; ?>
                    <b>Command:</b> <? echo $row['LogShellCommand']; ?>
                    <b>Executed:</b> <? echo $row['LogShellReturn']; ?>
                    <b>Time:</b> <? echo format::time($row['LogShellTime']); ?>
                </td>
            </tr>
        </table>
    <? endwhile; ?>

<? break; ?>

<? case 'fatal': ?>
<? case 'warning': ?>
<? case 'notice': ?>
<? case 'unknown': ?>

    <? while ($row = $data['loop']->fetch()) : ?>
        <table class="t-errors">
            <tr>
                <td <? if ($row['LogErrorSeen'] == 0) { echo 'class="e-selected"'; } ?>>
                    <b>String:</b> <? echo $row['LogErrorString']; ?>
                    <b>File:</b> <? echo $row['LogErrorFile']; ?>
                    <b>Line:</b> <? echo $row['LogErrorLine']; ?>
                    <b>Context:</b> <? echo $row['LogErrorContext']; ?>
                    <b>Ip:</b> <? echo $row['LogErrorIP']; ?>
                    <b>Time:</b> <? echo format::time($row['LogErrorTime']); ?>
                </td>
            </tr>
        </table>
    <? endwhile; ?>

<? break; ?>
<? endswitch; ?

I'm getting this error:

Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT in /Applications/XAMPP/xamppfiles/htdocs/Smooth Framework/tpl/terminal.tpl.php on line 33

Where line 33 is the line 2 of this script. This is inserted in a template context. What's wrong with this? He is expecting a T_CASE and that's what is there!

© Stack Overflow or respective owner

Related posts about php

Related posts about html