PHP not stopping the include (break)
<p>I'm trying to get my script to find all of the PHP files in my include directory and put them in to an array (I've done the array part). Then, the script does a for loop to check if the GET request matches the current position value in the array (or whatever you want to call it).</p>

<p>But, if it doesn't find it at all.. it will include the default page, but obviously if it does it'll include the file it matched.</p>

<p>The problem is.. the break command isn't working at all. So, it's including the default page if it's been matched. Please help.</p>

<pre><code>   &lt;?php

 if(!defined("PLUGIN")){
    echo "You cannot view this file directly.";
 } else {
    $glob = glob("inc/*.php");
    $count = count($glob);
    for($i=0;$i&lt;$count;$i++){
        $explode = explode("/", $glob[$i]);
        $explode2 = explode(".", $explode[1]);
        if($_GET["page"] == $explode2[0]){
            include $glob[$i];
            break;
        } include_once "default.php";
    }
 }
?&gt;
</code></pre>
