need some good "conditional" tutorials

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

need some good "conditional" tutorials

Post by malcolmboston »

okay guys

just thought of some nice ideas for my site and basically they will be using alot of my flash design inside it, i built an e-mail and instant messaging client on my site anfd would like to tell people if they have new mail etc before they actually view there mail

so for eg
pseudocode

Code: Select all

> if new mail
> display flash pic
> if no new mail
> display nothing
etc

if anyone can point me in the right direction to some complex tutorials for this it would be mush appreciated

also ive just been learning loops and cannot really see the point in them, at least not in anything i need to do, i written a code that basically says 10, 9, 8 - 1, huge amounts of code when it could be just written in pla9in HTML/XML what are loops commonly used for?

(link for conditions would be extremely appreciated!)

Thanks in advance
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Cant see the point of loops? I don't think PHP would be very useful without them

Some uses off top of my head

> Looping through returned results of query
> Looping through and Array
> Looping and executing code until a certain condition is met

The list could go on and on and on and on....

Mark
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

ah i see, i just have never used them :(
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

have a look at the control structures section of the manual

http://uk.php.net/manual/en/control-structures.php

Mark
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

is there anyway of getting that whole manual

in this format here http://uk.php.net/manual/en/control-structures.php

to download because my new is down at home and i have the PHP manual but dont really like it
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

thank you v-much

i have the other manual and it sucks
Post Reply