-
extracting some useful data from variable
Hello
I have a variable like this
$test="/usr/local/software/test";
and I want get only /usr/local/software from the variable above.
Which is the fast way to get it (possibly without using explode_array) ?
it should work also in other situations for example
$test="/usr/local/software/my/world";
should return "/usr/local/software/my"
Any help please ?
Thank you
-
SitePoint Wizard
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks