koie Posted December 27, 2004 Share Posted December 27, 2004 Hi folks, hope you all had a wonderfull x-mas. I need some help removing .gif or .jpg from a variable but my php knowledge is limited. I need to know how in VB but not in PHP the variable $image is 9043900796.gif the part before .gif wil be different al the time. Can someone give me some advice? Remko Link to comment Share on other sites More sharing options...
markmca Posted December 27, 2004 Share Posted December 27, 2004 Hi folks, hope you all had a wonderfull x-mas. I need some help removing .gif or .jpg from a variable but my php knowledge is limited. I need to know how in VB but not in PHP the variable $image is 9043900796.gif the part before .gif wil be different al the time. Can someone give me some advice? Remko <{POST_SNAPBACK}> What you can do is you can explode the variable in the follwoing way $resimage=explode(".",$image); and then take the first element from the array created after the split operation that is $image1=$resimage[0]; Hope this will solve out your problem :P Link to comment Share on other sites More sharing options...
koie Posted December 27, 2004 Author Share Posted December 27, 2004 Thanks a lot, that did the trick. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.