Forum Moderators: coopster
$months["01"]='January';
$months["02"]='February';
$months["03"]='March';
$months["04"]='April';
$months["05"]='May';
$months["06"]='June';
$months["07"]='July';
$months["08"]='August';
$months["09"]='September';
$months["10"]='October';
$months["11"]='November';
$months["12"]='December';
$string='/www/htdocs/www/200401';
$string=str_replace('/www/htdocs/www/','',$string);
$year=substr($string,0,4);
$month=$months[substr($string,4)];
echo $month,', ',$year;
This method is of course very primitive and won't work if the directory is named even slightly differently. For a more universal approach you will have to use regular expressions.
See:
[cmgm.stanford.edu...]
[lehigh.edu...]
I don't know about using commas in path names.
Tom