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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:00:30+00:00 2026-06-11T12:00:30+00:00

I am having no success using array_combine() . Can anyone help me get …

  • 0

I am having no success using array_combine(). Can anyone help me get …

from THIS

array
  0 => 
    array
      0 => 
        array
          'traitvalue01' => string 'width'
          'traitvalue02' => string 'Length'
          'traitvalue03' => string 'Top'
          'traitvalue04' => string 'Bottom'
  1 => 
    array
      0 => 
        array
          'trait01' => string '7 in'
          'trait02' => string '25 in'
          'trait03' => string '3 in'
          'trait04' => string '3 in'

to THIS

array
    string 'width'  => string '7 in'
    string 'Length' => string '25 in'
    string 'Top'    => string '3 in'
    string 'Bottom' => string '3 in'
  • 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-11T12:00:32+00:00Added an answer on June 11, 2026 at 12:00 pm

    Here is my solution:

    <?php
    
    $a = array(
            array(
                array(
                    'traitvalue01' => 'width',
                    'traitvalue02' => 'Length',
                    'traitvalue03' => 'Top',
                    'traitvalue04' => 'Bottom'
                )
            ),
            array(
                array(
                  'trait01' => '7 in',
                  'trait02' => '25 in',
                  'trait03' => '3 in',
                  'trait04' => '3 in'
                )
            )
        );
    
    print_r(array_combine($a[0][0], $a[1][0]));
    
    ?>
    

    And this is the output:

    Array
    (
        [width] => 7 in
        [Length] => 25 in
        [Top] => 3 in
        [Bottom] => 3 in
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having issues referencing $(this) from within a the nested ajax 'success' function... I know
I'm having more problem with JSON! I am using the advice from this article
I've been trying to get this working, and not having 100% success, basically trying
I'm using XSLT and having great success, just got a couple of problems. Warning:
How can I do something like if sys.argv[0] != '%windir%\\blabla.exe' I'm having no success
I am having some issues returning data from on page, using jQuery, PHP and
I have a string of JSON like this: { letterstats:[ {time_taken:636,mistake_letters:,the_letter:L,success:true}, {time_taken:216,mistake_letters:,the_letter:U,success:true}, {time_taken:103,mistake_letters:,the_letter:I,success:true} ],
I'm having trouble getting this simple query to execute. I'm using nameless parametized queries
I am using the Valum AJAX upload script from: https://github.com/valums/file-uploader I am having trouble
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To

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.