Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-08-20, 09:04 AM   #5
iMan
Lord help me, I'm just not that bright
 
iMan's Avatar
 
Join Date: Jun 2006
Location: Los Angeles
Posts: 101
Hey japamor,

Quote:
Many thanks to iMan and cd34. That's saved me hours of work.
Cool.
It's usually the "little" things that takes time.
And if you're just learning PHP, and don't know any other C type of language, some of the most common mistakes, besides the php tags, are: To not put a semi colon a the end of a line, mixing up equal operator (== and/or ===) with assignment operator (=), using a bitwise operator (&, |) when you intend to use a boolean operator (&&, ||).

There are of course more... but I think these are the most common little buggers that you should pay attention to

Btw, although I totally agree with cd34, here's a "quick and dirty" way to do the daily photo:
<?php
for($i=0; $i<7; $i++){
if(date("w") == $i){
echo "<img src='http://www.japamor.com/banners/ferrocash/sfs/200x250_00$i.gif'>";
}// if
}// for
?>

This requires your pictures to be named in a sequential way though.. with 0,1,2,3.. etc. where the $i is in the "img src" tag.

Many ways lead to Rome,
happy coding
__________________
iMan is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:17 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc