How to remove all data after last dot using php?
<p>How to remove all data after last dot using php ?</p>

<p>I test my code. It's echo just <code>aaa</code></p>

<p>I want to show <code>aaa.bbb.ccc</code></p>

<p>How can i do that ?</p>

<pre><code>&lt;?PHP
$test = "aaa.bbb.ccc.gif";
$test = substr($test, 0, strpos($test, "."));
echo $test;
?&gt;
</code></pre>