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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:11:45+00:00 2026-05-27T08:11:45+00:00

I have been working on getting $.ajax data compiled by using an php class

  • 0

I have been working on getting $.ajax data compiled by using an php class I wrote. The data come out like this:

{ 
0: [ 
    { Status : "example status 2"
    , Contact ID Number : "1"
    , Date Entered : "2011-06-15"
    , Date Assigned : "2011-06-15"
    , Date Last Modified : "2011-06-15"
    , Deceased Date : ""
    , Linked To Registrant 1 : "Leona Brown"
    , Relationship 1 : "Father"
    , Authorization 1 : "1"
    , Linked To Registrant 2 : "Henry Sale"
    , Relationship 2 : "Husband"
    , Authorization 2 : "1"
    , Location : "Hamilton Harron Funeral Home"
    , Sales Manager : "Dan Thompson"
    , Counselor : "Mike Brown"
    , Registration Number : "1"
    , Registration Date : "2001-05-11"
    , Program 1 Number : "2"
    , Program 1 Date : "2003-11-05"
    , Program 1 Name : "Non Registrant Test Program - Advantage"
    , Program 2 Number : "--"
    , Program 2 Date : "--"
    , Program 2 Name : "--"
    , First Name : "Onelia"
    , Last Name : "Garcy"
    , Address Location 1 : "home"
    , Address 1 : ""
    , City 1 : "Houston"
    , State/Province 1 : "Texas"
    , Zip/Postal Code 1 : "77019"
    , Home Phone : "--"
    , Work Phone : "--"
    , Mobile Phone : "--"
    , Pager : "--"
    , Other Phone : "--"
    , Email : ""
    , Sales Type : "Pre-Need"
    , Note 1 : "This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. This is Note 3. " 
    } 
]
, 1: [ 
    { Status : ""
    , Contact ID Number : "2"
    , Date Entered : "2011-07-02"
    , Date Assigned : "2011-07-02"
    , Date Last Modified : "2011-07-02"
    , Deceased Date : ""
    , Linked To Registrant 1 : "--"
    , Relationship 1 : "--"
    , Authorization 1 : "--"
    , Linked To Registrant 2 : "--"
    , Relationship 2 : "--"
    , Authorization 2 : "--"
    , Location : "Floral Haven Funeral Home "
    , Sales Manager : "Jayson Gordon"
    , Counselor : "Henry Murdoc"
    , Registration Number : "3"
    , Registration Date : "2003-12-02"
    , Program 1 Number : "4"
    , Program 1 Date : "2004-03-05"
    , Program 1 Name : "Non Registrant Test Program - Advantage"
    , Program 2 Number : "--"
    , Program 2 Date : "--"
    , Program 2 Name : "--"
    , First Name : "Leo"
    , Last Name : "Brown"
    , Address Location 1 : "home"
    , Address 1 : "5330 Ridge Rd "
    , City 1 : "Burlington"
    , State/Province 1 : "Ontario"
    , Zip/Postal Code 1 : "LVL7N9"
    , Home Phone : "9053919735"
    , Work Phone : "--"
    , Mobile Phone : "9057303737"
    , Pager : "--"
    , Other Phone : "--"
    , Email : "hmind@dont.com"
    , Sales Type : "PN to AN"
    , Note 1 : "This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. This is Note 5. " 
    } 
]
, 2: [ 
    { Status : "example1 status"
    , Contact ID Number : "3"
    , Date Entered : "2011-09-05"
    , Date Assigned : "2011-09-05"
    , Date Last Modified : "2011-09-05"
    , Deceased Date : ""
    , Linked To Registrant 1 : "Onelia Gary"
    , Relationship 1 : "Wife"
    , Authorization 1 : "1"
    , Linked To Registrant 2 : "--"
    , Relationship 2 : "--"
    , Authorization 2 : "--"
    , Location : "First Memorial Funeral Services"
    , Sales Manager : "Dan Thompson", Counselor : "Steve Brown"
    , Registration Number : "5"
    , Registration Date : "2010-11-11"
    , Program 1 Number : "7"
    , Program 1 Date : "2011-08-19"
    , Program 1 Name : "Non Registrant Test Program - Dignity"
    , Program 2 Number : "6"
    , Program 2 Date : "2011-07-03"
    , Program 2 Name : "Non Registrant Test Program - Advantage"
    , First Name : "Henry"
    , Last Name : "Murdoc"
    , Address Location 1 : "company"
    , Address 1 : "9055 Harvy Rd. 4"
    , City 1 : "Burlington"
    , State/Province 1 : "Ontario"
    , Zip/Postal Code 1 : "L7L5Z7"
    , Home Phone : "9055679602"
    , Work Phone : "9057455209"
    , Mobile Phone : "--"
    , Pager : "--"
    , Other Phone : "--"
    , Email : "pewter@live.com"
    , Sales Type : "At-Need"
    , Note 1 : "This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. This is Note 6. "
    } 
   ] 
}

Firebug reports this error:

missing : after property id
…/view_contacts_search_1.php#
Line 188

It fails when instantiating a variable:

<script type='text/javascript' >
        $(document).ready(function(){ 
                var data = <?php echo($data)?>;

Can you spot what/where the missing element is? I have been trying to figure this out for a few hours and it has me stumped. Being new to javascipt and jquery does not help either 🙂

  • 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-05-27T08:11:45+00:00Added an answer on May 27, 2026 at 8:11 am

    Your property names are numeric – that is not valid JavaScript. Try renaming the top level properties or making them strings.

    These are all valid replacements:

    { 
        _0: [ ...
    
    { 
        number0: [ ...
    
    { 
        '0': [ ...
    

    But honestly it is always best to make the property names quoted strings to avoid issues like this.

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

Sidebar

Related Questions

I have been working on this form for my php class. I can not
I've been working with the PHP api for google Calendar, and have been getting
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been trying to get a basic reorderlist working following this guide ->
I have been working on getting a basic ATL project to compile in Visual
I have been working on this for the past 5 hours. For some reason
I have been working on a website using MVC Preview 1 since it came
I have been using the JEditable plugin for JQuery and I would like to
I have been working on getting a python CGI script to work all day,
Alright so i have been working on this Dynamic load of a spinner from

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.