I need some help with the IF command...


Posted on 16th Feb 2014 07:03 pm by admin

I have a large number of images in one section of my website with the .jpg format. I'm adding a bunch of new images thanks to a new camera, but in using Picasa to bulk export smaller images sizes, they are all exported with .JPG.

These are head shots (mug shots) for basketball player profile pages. It's just supposed to be one photo, but the .jpg code isn't printing the .JPG files, which is obvious, so I added a line to print the newly exported .JPG files. The problem is I'm getting two items printed, the image and an image holder.

How do I code it to basically say.... "if *this* file type exists....echo *this* file....else if *this* file type exists....echo *this*.

Here is the code I'm using:

echo '<div><img src="/wp-content/uploads/' . $line['nameLast'] . $line['nameFirst'] . '.jpg"></div>';
echo '<div><img src="/wp-content/uploads/' . $line['nameLast'] . $line['nameFirst'] . '.JPG"></div>';

No comments posted yet

Your Answer:

Login to answer
225 Like 9 Dislike
Previous forums Next forums
Other forums

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_da

RadioButtonList data selection
view plaincopy to clipboardprint?

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

PHP/PKI
I am trying to set up a web application that uses pki. does anyone have a good tutorial to set this

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash