Story:
Ok I'm reading a csv file and one of the values is a image name, green_dot1.gif.
Question:
Is there a way, once I have read the value, to remove the .gif extension so it becomes green_dot1?
It would be cool if so.
TIA guys and gals!
Wes/
Image Names
Moderator: General Moderators
sure, use str_replace()
go here for the usage..
http://www.php.net/manual/en/function.str-replace.php
go here for the usage..
http://www.php.net/manual/en/function.str-replace.php
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
The other thing you can do (because it's always nice to have options) is use basename():
Mac
Code: Select all
$var = basename($var, '.gif')