get the largest number from url in php?
<p>On my website I have my pages in this format:</p>

<pre><code>www.mysite.com/45.php
www.mysite.com/81.php
www.mysite.com/58.php
www.mysite.com/415.php
</code></pre>

<p>I have the numbers in order. How can I get the largest number which is in this case 415 and store it in a var. I tried this:</p>

<pre><code>&lt;?php
for ($urlCheck = 1000000; ; $urlCheck--){
    if (file_exists()){
        echo "true";
        break;
        }

    }

?&gt; 
</code></pre>

<p>but I am not sure how I get this thing to work.</p>
