I am trying to simply cut off the end of a string - but can't seem to find the answer...
I have a string something like: c:\Inetpub\wwwroot\
and I would like to cut off the last two backslashes.
I am new to PHP, please be kind!
simple, here's how:
$yourString = "something"; $yourString = substr($yourString, 0 /* the startindex */, strlen($yourString) - 2 /* number of chars to cut */);
That worked like a charm - THANKS for the quick and accurate reply!!!