I have a new very intriguing problem at hand.
I have the name of my Images stored in my mySQL
database in one column. Now when i pick the images,
they are displayed as it as. However, they are the big
images, and the thumbnails of those images are stored
with an a at the end of thier names.
(untested)
$newname = eregi_replace('\.jpg$', 'a.jpg', $oldname);
No point messing up your database; just use something like the above when
you're outputting the image tags for the thumbnails.
miguel
On Mon, 8 Apr 2002, Thomas Edison Jr. wrote:
I have a new very intriguing problem at
$parts = preg_split('/\./', $filename);
$new_filename = $parts[0] . a.jpg;
(Not tested, but _should_ work.)
/bsh/
Thomas Edison Jr. wrote:
I have a new very intriguing problem at hand.
I have the name of my Images stored in my mySQL
database in one column. Now when i pick the images,
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.
Hi,
Thanks for your relies. There are a couple of
problems. Firstly, i'm picking the filename from the
database, so my code is something like this :
if ($myrow = mysql_fetch_array($result)) {
do {
echo(
img src=\images\\$myrow[ilmage]\
);
} while ($myrow =
$thumbnail = eregi_replace('\.jpg$', 'a.jpg', $myrow['ilmage']);
$thumbnail = eregi_replace('\.gif$', 'a.gif', $thumbnail);
It's no problem to do it twice in a row; it'll pick up one or the other.
miguel
On Mon, 8 Apr 2002, Thomas Edison Jr. wrote:
Hi,
Thanks for your relies. There are
it
with the 'a'.. Hope it helps!
Rick
Be kind. Everyone you meet is fighting a hard battle - John Watson
From: Thomas Edison Jr. [EMAIL PROTECTED]
Date: Mon, 8 Apr 2002 01:17:51 -0700 (PDT)
To: Miguel Cruz [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Adding a in try.jpg! Problems!
Hi
Hi,
Thanks.. actually that problem is solved, this is what
i used :
$myrow[ilmage] = eregi_replace('\.jpg$', 'a.jpg',
$myrow[ilmage]);
$myrow[ilmage] = eregi_replace('\.gif$', 'a.gif',
$myrow[ilmage]);
and it's now showing the small images with the a!!
Thanks AGAIN!
T. Edison Jr.
---
$myrow[ilmage] = eregi_replace((\.[^\.]+)$, a\\1, $myrow[ilmage]);
and if ilmage isn't a constant use $myrow[ilmage].
Thomas Edison Jr. [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
Thanks for your relies. There are a couple of
problems. Firstly,
ROTECTED]
Subject: Re: [PHP] Adding a in try.jpg! Problems!
Hi,
Thanks for your relies. There are a couple of
problems. Firstly, i'm picking the filename from the
database, so my code is something like this :
if ($myrow = mysql_fetch_array($result)) {
do {
echo(
img src=\images
guel Cruz [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Adding a in try.jpg! Problems!
Hi,
Thanks for your relies. There are a couple of
problems. Firstly, i'm picking the filename from the
database, so my code is something like this :
if ($myrow = mysql_fet
11 matches
Mail list logo