| 
	
 | 
 Posted by Geoff Berrow on 03/04/07 13:49 
Message-ID: <1173014480.065795.268720@30g2000cwc.googlegroups.com> from 
Davide contained the following: 
 
>$file = foo.gif 
> 
>$file = strstr($file, "."); 
>it prints ".gif" 
> 
>but I cannot print only the name of a file, "foo" 
> 
>what function can do this? 
$file='foo.gif'; 
echo substr($file, 0, strpos($file,"."));  // echoes 'foo' 
 
--  
Geoff Berrow (put thecat out to email) 
It's only Usenet, no one dies. 
My opinions, not the committee's, mine. 
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
 
  
Navigation:
[Reply to this message] 
 |