Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I strip unwanted characters from a string?

Status
Not open for further replies.

shirls

Programmer
Aug 2, 2001
8
0
0
GB
Hiya

Basically I want to strip the string (D:\parts pics finished\Dcp_1187.jpg) so that I am left with just the file name "Dcp_1187.jpg".

Any help would be brill :)

Shirl
 
$myFile = basename("D:\parts pics finished\Dcp_1187.jpg");

$myFile now contains "Dcp_1187.jpg"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top