![]() |
Hey
I am currently making a gallery and have come a long way.
What I want to do now is: $title=$name where $name is file-with-dashes.jpg Now I want $title to be $name with dashes replaced with spaces and .jpg removed. I have shortened text before but never chopped off the ending... |
PHP Code:
|
thanks man! I'll post a link to the gallery here once it's done.
|
Quote:
|
The 0 is the start position and the -4 is the end position, ie chop 4 characters off the end.
http://uk.php.net/substr |
Oh, ok, you mean like chop off the .jpg or .gif?
|
Yep :)
|
Thanks! See? Even an old dog can learn new tricks. ;)
|
What if I want to display the first word that comes before a dash?
like: file-with-dashes.jpg = file |
PHP Code:
|
All times are GMT. The time now is 06:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|