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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:21:43+00:00 2026-06-08T06:21:43+00:00

i have a json like this:(this is for treeview jquery plugin which load treeview

  • 0

i have a json like this:(this is for treeview jquery plugin which load treeview by ajax)

[
{
    "text": "1. Pre Lunch (120 min)",
    "expanded": true,
    "classes": "important",
    "children":
    [
        {
            "text": "1.1 The State of the Powerdome (30 min)"
        },
         {
            "text": "1.2 The Future of jQuery (30 min)"
        },
         {
            "text": "1.2 jQuery UI - A step to richnessy (60 min)"
        }
    ]
},
{
    "text": "2. Lunch  (60 min)"
},
{
    "text": "3. After Lunch  (120+ min)",
    "children":
    [
        {
            "text": "3.1 jQuery Calendar Success Story (20 min)"
        },
         {
            "text": "3.2 jQuery and Ruby Web Frameworks (20 min)"
        },
         {
            "text": "3.3 Hey, I Can Do That! (20 min)"
        },
         {
            "text": "3.4 Taconite and Form (20 min)"
        },
         {
            "text": "3.5 Server-side JavaScript with jQuery and AOLserver (20 min)"
        },
         {
            "text": "3.6 The Onion: How to add features without adding features (20 min)",
            "id": "36",
            "hasChildren": true
        },
         {
            "text": "3.7 Visualizations with JavaScript and Canvas (20 min)"
        },
         {
            "text": "3.8 ActiveDOM (20 min)"
        },
         {
            "text": "3.8 Growing jQuery (20 min)"
        }
    ]
}
]

I want to write a php array which returns a json like this. Please help me.

I tried several ways to do it ,but I cannot do it.

  • 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-08T06:21:46+00:00Added an answer on June 8, 2026 at 6:21 am

    You can use json_encode PHP function

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

Sidebar

Related Questions

I have JSON text that looks like this: { ok: true, totalPages: 256, arReports:
I have a JSON which looks like this { secInfo: [ { loginResult: 1,
I have an AJAX call that returns some JSON like this: $(document).ready(function () {
I have a JSON format like this returned via a ajax call { user_page_id:36,
Now i have a json code like this: {1: { text:e1, children: { 1:
I have json object like this, the site is running codeigniter which is ultimately
I have JSON like this: { something: http://something.com } and HTML like this: <a
i have json data like this {GetStudentDetails: {TotalCount:5, RootResults:[ {city:West Chester,country:USA,state:PA ,student_id:100}, {city:Philly,country:USA,state:PA,student_id:101}, {city:Buffalo,country:USA,state:NY,student_id:102},
I have a JSON like this { id:1, name:Jack, parent.id:2 } Note the dot
I have a json string like this: { d: { results: [ { __metadata:

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.