Count number of times a character appears in a url using PHP
<p>I want to count the number of times "/" appears in this url</p>

<p>Here is my code</p>

<pre><code>$url = "http://www.google.com/images/srpr/nav_logo14.png";
$url_arr = eregi(".",$url);
echo count($url_arr);
</code></pre>

<p>It displays on "1"</p>
