Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8592793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:50:12+00:00 2026-06-11T23:50:12+00:00

Let me explain the array bellow: 1, 2 and 3 stand for Monday, Tuesday

  • 0

Let me explain the array bellow:

1, 2 and 3 stand for Monday, Tuesday and Wednesday.

13, 14, and 15 are the days of the month.

And 15:00 – 16:20 (..) are the hours the movies are going to be shown.

Meaning on Monday 13th from 3pm to 4:20pm you can watch “Batman”.

Also on Monday 13th from 6:10pm to 7:30pm you can watch “Misery” … and so on.

$myarray
: array = 
  1: array = 
    13: array = 
      15:00 - 16:20: array = 
        Movie: string = Batman                 
      18:10 - 19:30: array = 
        Movie: string = Misery                 
  2: array = 
    14: array = 
      15:00 - 16:20: array = 
        Movie: string = The Avengers                
      16:20 - 17:50: array = 
        Movie: string = The Hours                 
  3: array = 
    15: array = 
      18:10 - 19:30: array = 
        Movie: string = Gladiator  

Could you please help me to echo this array so you can see the info in it in the following format?:

Monday - 13
15:00 - 16:20 - Batman
18:10 - 19:30 - Misery
Tuesday – 14 
15:00 - 16:20 - The Avengers                
16:20 - 17:50 - The Hours
Wednesday – 15
8:10 - 19:30  -  Gladiator  

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:50:13+00:00Added an answer on June 11, 2026 at 11:50 pm

    I’m making an assumption about the true layout of your array, the following will create a $weekDays array to map an integer and a day of the week (I define the keys so you can shift them at any time):

    $weekDays = (1=>'Monday', 2=>'Tuesday', 3=>'Wednesday', 4=>'Thursday', 5=>'Friday', 6=>'Saturday', 7=>'Sunday');
    
    // loop through each week-day in the array
    foreach ($myarray as $weekDay => $dates) {
        // loop through each "movie date" in the current week-day block
        foreach ($dates as $monthDate => $movies) {
            // output the day-of-the-week and the date-of-the-month
            echo $weekDays[$weekDay] . ' - ' . $monthDate . '<br />';
    
            // loop through all of the movies for the current date-of-the-month
            foreach ($movies as $movieTime => $movie) {
                // output the movie's time and name
                echo $movieTime . ' - ' . $movie . '<br />';
            }
        }
    }
    

    This is assuming the array in your example is really in the format:

    $myarray = array(
        1 => array(
            13 => array(
                '15:00 - 16:20' => array(
                    'Movie' => 'Batman'
                ),
                '18:10 - 19:30' => array(
                    'Movie' => 'Misery'
                )
            ), // ... can repeat
        ), // ... can repeat
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To explain my question, let me first point to this array: <?php $_depends =
Let me explain it by a small example: >>> x = np.array([[1,2], [3,4], [5,6],
A confusing title I know. Let me explain. I have to marshal an array
Let's say I have an unsorted array from 1 to 10, as shown below...
Let me explain my problem. I try to generate an array of categories. Here
But of a confusing title so let me explain. I have an array of
Let me explain best with an example. Say you have node class that can
Let we explain what I mean. Some time ago, while writing a program in
Let me explain you my situation. I have a base class called Shape, and
Let me explain: I need to sort a list in ascending order, while results

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.