Problem with my first loop

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
SICHTA0811
Forum Newbie
Posts: 1
Joined: Wed Oct 15, 2014 2:16 pm

Problem with my first loop

Post by SICHTA0811 »

The Idea of the loop is to count how many days are missing to reach the omer. Omer is a Party, that party is in the day 49, no more, no less. The system have to show me how many days are missing and in the case that we reach the day 49, the system will say The omer is over.

Code: Select all

    <?php
    $days = 0;
    $omer = 0;
    
	While($days < 49) {
	    $omer = $days + 1;
	    $omer = 49;
	    }
	    if ($days < 49) {
	        $omer = $days + 1;
	        echo "Hoy es el dia". " ". $omer. " ". "del Omer";
	    }     
	    else {
	        echo "Ya se acabo el omer";
	}
    ?>
Post Reply