On Monday 08 April 2002 15:41, Thomas Edison Jr. wrote:
> How can i :
> 1. Insert "a" at the end of the name of the image,
> before the ".extension" through PHP.
> The problems are that the names are stored in the
> database WITH the extesion. And the extensions also
> vary, some are JPG and some are GIF. So in my datase i
> have images as "try.jpg" or "something.gif"! How can i
> insert an "a" at the end of the name before the "." ?
>
> 2. OR.. can i insert the "a" before the "." in the
> image name in my mySQL database itself.
Loads of ways to do it. Here's one:
explode() the file name on "." then concatenate an "a" onto the second from
last element, then implode().
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Don't worry. Life's too long.
-- Vincent Sardi, Jr.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php