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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:45:48+00:00 2026-06-16T01:45:48+00:00

Once upon a time, I was using PHP to display all my data. Now

  • 0

Once upon a time, I was using PHP to display all my data. Now I want to use AJAX.

Where I used to get my data in PHP:

<?php 
    $array = $this->disparray;

    foreach($array as $key => $value){
        $mlsnum = $value['1'];
        echo "<div>" . $mlsnum . "</div>";
    }
?>

Where $this->disparry was some function in joomla that put data into an array. The structure of which looked like

array (

    0 => array (
        0 => data1,
        1 => data2,
    );,

    1 => array (
        0 => data1,
        1 => data2,
    );,

);

now I have an AJAX function that works (or at least returns an alert.

var results = $('#hidden').serialize();

var url = 'index.php?option=com_mls&view=list&format=raw&' + results;

$.ajax({
    url: url,
    success: function(data){
        $('#test').html(data);
        alert(data);
    },
    error: function(){
        alert('There was an error loading your request.  <br />Please try again later.');
    }
});

Nothing is written to #test and nothing is displayed in the alert(even though the alert happens). Why for? I should be getting a whole lot of array data, except I don’t even get a lump of coal.

  • 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-16T01:45:50+00:00Added an answer on June 16, 2026 at 1:45 am

    Make sure you’re encoding your php array before echoing it out so jQuery can parse it.

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

Sidebar

Related Questions

The Problem Once upon a time, I wrote an internal application to read data
Once upon a time, I had a DropDownList with Options built using this code:
Once upon a time I was thought by more advanced web developers (gee, when
Once I use visualTreeHelper.getchild to find a child object, how would I get the
I'm posting some data to a PHP script via jQuery AJAX, and everything executes
For a long time now, we've held our data within the project's repository. We
Ok, so once upon a time, my code worked. Since then I did some
Once upon a time, to write x86 assembler, for example, you would have instructions
Once upon a time there was a class: public class Scope<C extends Cloneable &
I had 2 grails projects which worked once upon a time, meaning I could

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.