var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Truncate File name...
I am using a script that lists all of the files in a certain directory, for example, the page will list:
I want to remove the extension. I figure the best and easiest way would be to have the script calculate the length of the file name, and then subtract "4" and then post the remaining charcters:
Is there an easy and simple way to do this, oh wise phpers!
Taking the last 4 characters off is one way to do it. Or you could take everything off after the last period (if there are file extension lengths are not always 3 characters). You can do this many different ways.
You'll probably want to use some combination of substr, strrpos, strpos, strlen, or maybe even explode.