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

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

Need help urgant
why down my code ony return one item instead of all the items selected.

$arr = array($date,$

Get ID from Database when Posting with a HTML Form
I have a form I am submitting to a MySql database. Each product has an ID # attached to it that auto

my login script page is not working on remote computers
hi my login is working on my computer, but when i tried 2 computers from 2 different locations, they

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are

Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&

Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

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