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 885881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:58:49+00:00 2026-05-15T12:58:49+00:00

$breakfast = array( ‘rest_id’ => $rest_id , ‘type’ => ‘Breakfast’ , ‘value’ => $bprice

  • 0
         $breakfast = array(
                               'rest_id' => $rest_id  ,
                               'type' => 'Breakfast' ,
                               'value' => $bprice  
                                );



            $lunch = array(
                               'rest_id' => $rest_id  ,
                               'type' => 'Facilities' ,
                               'value' => $lprice  
                                );


            $dinner = array(
                               'rest_id' => $rest_id  ,
                               'type' => 'Facilities' ,
                               'value' => $dprice  
                                );

            $data = $breakfast . $lunch . $dinner;

Is the way i created the array $data correct? If yes… now how do i get the array breakfast inside it, if i want to pass it to one function?

I want to do something like this:

$this->db->insert_breakfast($breakfast);

So how do i get breakfast array out of $data now?

  • 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-05-15T12:58:49+00:00Added an answer on May 15, 2026 at 12:58 pm

    If you want $breakfast, $lunch and $dinner to make a multi-dimensional array in $data, you will need to replace your assignment with the following.

    $data = array('breakfast' => $breakfast, 'lunch' => $lunch, 'dinner' => $dinner);
    

    Then you can access any of them like $data['breakfast']['value'].

    I didn’t quite understand the DB part. Comment back and I’d be glad to help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a global variable myval which is of String type. String[] Category={----SELECT----,BEVERAGES,BREAKFAST,LUNCH,DINNER,DESSERTS,APPETIZERS &
So I have data in my database & the value of category is set
Now the below xsl sort based on distinct Board Type + less price Room
Hi can someone tell me how to create slider similar to http://mcdonalds.com.au/our-food/menu/#/breakfast (burgers slider)
A while ago I used a rails3 plugin that let you type in any
I have an xml output like this: <data> <item-types> <entry id=1 items=5> <category>Frozen</category> </entry>
I currently have an ASP.NET script for a TV guide which displays the data
I'm working on a website that allows people who run bed and breakfast businesses
for better understanding check out this link first: http://sxsw.usehipster.com/questions/where-are-the-best-breakfast-tacos-in-austin as you can see there,
Let's say I have the following command object: class BreakfastSelectCommand{ List<Breakfast> possibleBreakfasts; Breakfast selectedBreakfast;

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.