if statements or if then elseif?

Soldato
Joined
7 Jan 2007
Posts
10,607
Location
Sussex, UK
Hi guys in PHP should you do this:

if (condition)
(
code
}

if (condition)
{
code
}

else
{
do this
}

OR IS this the correct way:

if (condition)
{
code
}

elseif (condition)
{
code
}

else
{
code
}


I only ask as I have done the first example and some scripts work, others don't seem to work for all statements.
 
I'll have to post the logic up tonight. Sounds like the problem may not be my code, it could be that cron job didn't work or simply the XML I scrape wasn't updated on that day.

I'm going to test it another week.
The logic runs on a day of the week and checks for numerical values and compares against the previous line in the db.

I'm 90% sure the source XML wasn't updated
 
Back
Top Bottom