PHP: Body is displaying 0

53 views Asked by At
$Test = function($text) {
        $html  = '<!DOCTYPE HTML>';
        $html .= '<html>';
        $html .= '<head>';
        $html .= '<noscript>';
        $html .= '<meta http-equiv="refresh" content="0; URL=/?javascript=false" />';
        $html .= '</noscript>';
        $html .= '</head>';
        $html .= '<body>';
        $html .= '<div>' + $text + '</div>';
        $html .= '</body>';
        $html .= '</html>';
        return $html;
    };

    $html = $Test('Test');

    echo($html);
    exit();

This is my code, I was testing Anonymous functions (http://php.net/manual/en/functions.anonymous.php), why is it that the noscript /noscript displays just fine in the Inspector but the div /div gets replaced by 0?

0

There are 0 answers