Jump to content

[SOLVED] How to get Parent directory from String


trekerboy

Recommended Posts

Hello,

 

I am trying to write a snippet of code that will get the parent directory of a given string. For example, the string might be $string = "/public_html/images/" and I need something that will return "/public_html/".

 

Any advice is appreciated!

 

- Jason

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.