Variable expression not working in if statement | PHP

<?php
    $page = (int) $_GET["page"];
    $view = $_GET["view"];
    echo "View => $view";
?>

<? if($view): ?>
    <p>Box</p>
<? endif; ?>

Even if the variable $view - which is a query parameter, is false, I get the p tag inside the if block. Why is that?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.