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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:46:55+00:00 2026-06-04T14:46:55+00:00

I have a multidimensional array in which some values are present i want to

  • 0

I have a multidimensional array in which some values are present i
want to retrieve the [0][1] or [1][1] index value. I am getting
undefined as array, if i tried to directly try to get the array value
am able to get the value.

This what i want to achieve

I had a select drop down menu , According to the selected index i
need to retrieve a message from the array box. For say if the index is
1 then i had to get [1][1] array index value if it is zero then [0][1]
array index value

This is the fiddle what i have done. http://jsfiddle.net/hTQZ9/

  • 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-04T14:46:56+00:00Added an answer on June 4, 2026 at 2:46 pm

    see this update: http://jsfiddle.net/hTQZ9/1/

    var MessagesObj = {
        testName: []
    }
    MessagesObj["testName"].push(["testName_custom_message_Label1val","Custom message for label 1"]);
    MessagesObj["testName"].push(["testName_custom_message_Label2val","Custom message for label 2"]);
    
    alert(MessagesObj["testName"][1][1]);
    
    var classChk       = $(".customCheckEnabled").get(0);
    var getClassindex  = classChk.selectedIndex;
    var getVarName     = classChk.id
    var getCstMsgName  = MessagesObj[getVarName];
    alert(getCstMsgName);
    
    var getMessage     = getCstMsgName[getClassindex][1];
    alert(getMessage);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i have multidimensional array in php i want to remove an index from
I have a multidimensional array, and I would have multiple arrays within it. Some
I have a multidimensional array, here: $noticeDate = json_encode( $noticesDates ); and I want
I have a multidimensional array of arrays (source below), where my keys and values
I have a large multidimensional array and I basically want to drop the first
I have a multidimensional-array which looks like this: $array = ( [0] => array
I have a multidimensional array or arrays which I also use in my configuration
I have a php multidimensional array which looks like this: $fields = array( array('input',
I have a multidimensional array which is the result of a JOIN statement. And
I am writing a script which must copy some names into a multidimensional array,

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.