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

  • Home
  • SEARCH
  • 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 8503079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:39:36+00:00 2026-06-11T01:39:36+00:00

My code is <tr> <td><input type=text name=batch_code[]/></td> <td><input type=text name=description[]/></td> <td><input type=text size=12 name=qty[]/></td>

  • 0

My code is

<tr>
<td><input type="text" name="batch_code[]"/></td>
<td><input type="text" name="description[]"/></td>
<td><input type="text" size="12" name="qty[]"/></td>
<td>
<select id="asset_id" class="asset_id" name="asset_id[][]" multiple="multiple">
<option class="dropdownlist">Asset Id 1</option> 
<option class="dropdownlist">Asset Id 2</option> 
<option class="dropdownlist">Asset Id 3</option>
</select>
</td>
</tr>

<tr>
<td><input type="text" name="batch_code[]"/></td>
<td><input type="text" name="description[]"/></td>
<td><input type="text" size="12" name="qty[]"/></td>
<td>
<select id="asset_id" class="asset_id" name="asset_id[][]" multiple="multiple">
<option class="dropdownlist">Asset Id 1</option> 
<option class="dropdownlist">Asset Id 2</option> 
<option class="dropdownlist">Asset Id 3</option>
</select>
</td>
</tr>

I want to get array inside array. but if i get print_r() of this asset_id. it result was
Array
(
[0] => Array
(
[0] => Asset Id 1
)

[1] => Array
    (
        [0] => Asset Id 2
    )

[2] => Array
    (
        [0] => Asset Id 1
    )

[3] => Array
    (
        [0] => Asset Id 3
    )

)

but what i want

Array
(
    [0] => Array
        (
            [0] => Asset Id 1
            [1] => Asset Id 2
        )

    [1] => Array
        (
            [0] => Asset Id 1
            [1] => Asset Id 3

        )
)

i was running this code with one square bracket “name=”asset_id[]”” but it result was
Array
(

[0] => Asset Id 1
[1] => Asset Id 2
[2] => Asset Id 1
[3] => Asset Id 3

)

please help me..

  • 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-11T01:39:37+00:00Added an answer on June 11, 2026 at 1:39 am

    Try this:

    <tr>
    <td><input type="text" name="batch_code[]"/></td>
    <td><input type="text" name="description[]"/></td>
    <td><input type="text" size="12" name="qty[]"/></td>
    <td>
    <select id="asset_id" class="asset_id" name="asset_id[0][]" multiple="multiple">
    <option class="dropdownlist">Asset Id 1</option> 
    <option class="dropdownlist">Asset Id 2</option> 
    <option class="dropdownlist">Asset Id 3</option>
    </select>
    </td>
    </tr>
    
    <tr>
    <td><input type="text" name="batch_code[]"/></td>
    <td><input type="text" name="description[]"/></td>
    <td><input type="text" size="12" name="qty[]"/></td>
    <td>
    <select id="asset_id" class="asset_id" name="asset_id[1][]" multiple="multiple">
    <option class="dropdownlist">Asset Id 1</option> 
    <option class="dropdownlist">Asset Id 2</option> 
    <option class="dropdownlist">Asset Id 3</option>
    </select>
    </td>
    </tr>
    

    Update:
    I have tried this out of curiosity, and the results are as required:

      ["asset_id"]=>
      array(2) {
        [0]=>
        array(2) {
          [0]=>
          string(10) "Asset Id 1"
          [1]=>
          string(10) "Asset Id 2"
        }
        [1]=>
        array(2) {
          [0]=>
          string(10) "Asset Id 1"
          [1]=>
          string(10) "Asset Id 3"
        }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code basis: echo '<input required type = text name = subject1
<form name = myForm onsubmit=foo()> <p class = form-text>Name</p> <input type = text name=name
To be specific, I'm talking about avoiding this type of code: <input type='text' id='title_33'
I have the following button: <input type=button count='<?php echo count($_SESSION['children']);?>' name=children class=add_child value=Add Another
Here is the input form code <tr valign=top> <td align=right class=innertablestyle><font class=normal><strong>Homepage</strong></font></td> <td>&nbsp;</td> <td>
Here is what I have: the input type text boxes are dynamically rendered from
Here is my jquery code: $('input').click(function(){ $('h1').empty().queue(function(){ console.log('queue'); }); }); }); Only the first
I'm trying to get this C++ code to input a series of numbers from
The code sorts two input sequences - seq01 and seq02 - on the basis
for the Given below code after int Input Value of 46348 i am getting

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.