Jump to content

Array and foreach Loop problem: Display days of week. Help please


hereisgoes

Recommended Posts

Hi guys.  So I have a little coding down but I am stuck on this problem:

 

/* Using only a array and a foreach loop, write a program that prints the days of the week *\

 

$days = array {

        'Monday',

        'Tuesday',

        'Wednesday',

        'Thursday',

        'Friday',

        'Saturday',

        'Sunday',

};

 

//This is where I need help with the code

 

          echo  "$day \r\n";

 

?>

 

Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.