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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

How to show the difference between two data field in a database with php.
Hello php gurus,

how r u all... i'm not so well facing a typical problem please help me...<

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

Help Import Animoto and Youtube
CAn someone help me urgently want to allow users on my website to import youtube/revver/dailymotion

is_dir() problem
Hello,

I'm buidling a php scripts that dynamically get's subfolders from a specific folder.

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

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