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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:26:32+00:00 2026-06-12T12:26:32+00:00

I am sending a PHP array via AJAX to a json array. The PHP

  • 0

I am sending a PHP array via AJAX to a json array. The PHP array is a multidimensional array and is the same in JSON. How can I assign that array to a multi-select select box? I am using the code below and although JSON gets the array and assigns it to the individual edit box on the html page. Everything works except for towns, which is a multidimensional array and edit_town is a

  // JSON CODE:
  // Edit an existing attorney:
$("input[name='editAttorneyBtn']").click(function() {

    var providerID = $(this).attr("rel");
    $.post("www/scripts/ajax/getAttorney.php",{id : providerID},function(data) {
        if(data.response == true) {
            var info = data.info;
            $("input[name='edit_name']").val(info.name);
                            $("input[name='edit_attorney']").val(info.attorney);
                            $("input[name='edit_telephone']").val(info.telephone);
                            $("textarea[name='edit_attorney_description']").val(info.description);
                            $("textarea[name='edit_attorney_description']").ckeditor(ckConfig);
                            $("input[name='edit_fax']").val(info.fax);
                            $("input[name='edit_email']").val(info.email);
                            $("input[name='edit_physical1']").val(info.physical1);
                            $("input[name='edit_physical2']").val(info.physical2);
                            $("input[name='edit_physical3']").val(info.physical3);
                            $("input[name='edit_town']").val(info.town);
                            $("input[name='edit_status']").val(info.status);
            $("input[name='edit_AttorneyID']").val(providerID);
                            $("select[name='edit_status']").val(info.status);
                            $("select[name='edit_town']").val(info.town);
            $("#editAttorneyContainer").dialog({width: 600, title: "EDIT ATTORNEY:"});
        } else {
            $("<div />").dialog("An error has occured retrieving this attorney information.");
            return false;
        }
    });
    return false;
});
  • 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-12T12:26:33+00:00Added an answer on June 12, 2026 at 12:26 pm

    As Wroniasty said, it was my input should have been a select 🙂

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

Sidebar

Related Questions

Scenario: Sending XML, generated using php, via cURL to an external server for parsing.
i'm sending values from one page via jquery's ajax to a php page. I'm
I've got a problem sending a file to a serverside PHP-script using jQuery's ajax
Using PHP how can I accurately test that a remote website supports the If-Modified-Since
I am trying to receive a json object back from php after sending data
I am using swiftmailer , a library for sending mail in php. The problem
I am sending a message via PHP's mail() with proper and complete headers. It
I have a PHP script that is sending a series of http requests to
I am sending info to target email via PHP native mail() method right now.
I have a page where the user sends data (via ajax) to a php

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.