looping

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
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

looping

Post by elecktricity »

just a quick question im trying to make a loop to make this code a bit smaller

Code: Select all

<?PHP
if ($num=='5' OR $num=='10' OR $num=='15' OR $num=='20') {
//$num continues to a hundred or so
echo $num;
echo '<br>';
}
?>
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

thats actually kinda freaky how similiar my code is to his... same variable name same place were the comment is displays the variable then adds a page break, well thanks for the link
Post Reply