Jump to content

Removing part of a string


dk4210

Recommended Posts

Hello guys,

 

I want to remove part of a string and convert it to a var instead of echoing it out.. How would I do it..

 

$string = "temp_photo/testing.jpg";

 

I want to remove temp_photo

 

so the out put should be

$filename2 = testing.jpg

 

Please advise..

 

Thanks, Dan

 

 

Link to comment
https://forums.phpfreaks.com/topic/218312-removing-part-of-a-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.