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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:26:53+00:00 2026-06-04T17:26:53+00:00

I keep getting stuck trying to decode some json I’m getting back from a

  • 0

I keep getting stuck trying to decode some json I’m getting back from a db query:

My result =

{"queryResults":[{"id":"1","pageName":"home","blurb":"<p>knowInk Publishing is a Media Professional Services firm dedicated to integrating existing publications into the technology of today, introduce the publications of the future and provide traditional services for the print industry.<\/p> \r\n<p>From e-publishing, e-singles, mobile, web and print design and development, printing on demand and our editorial services we can provide a nuts to soup solution to your publishing needs.<\/p>\r\nLearn more about how KI can help you.","imgPath":"images\/img_homepage.jpg"},{"id":"3","pageName":"about","blurb":"This is where the about text would go. ","imgPath":"images\/img_about.jpg"},{"id":"4","pageName":"services","blurb":"This is where we would talk about the services we can provide","imgPath":"images\/img_services.jpg"},{"id":"5","pageName":"marketplace","blurb":"This is where we will discuss our marketplace, where you can buy and sell things","imgPath":"images\/img_marketplace.jpg"}]}

I put the json into a session var and am able to retrieve it. But when I go to dig into it I am getting stuck. Here’s my PHP code:

print $_SESSION['basicPageHTML']; //works fine, gives me the json above

$code = json_decode($_SESSION['basicPageHTML']); 
print count($code->queryResults); //this seems right, gives me 4
foreach($code->queryResults as $thisKey => $thisValue) { 
     //I can't do anything here.
}

I’ve been away from PHP for a bit and it’s funny how you forget so quickly…

  • 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-04T17:26:54+00:00Added an answer on June 4, 2026 at 5:26 pm

    You did it correctly the first time. You just need to continue doing it.

    echo $thisValue->pageName;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Keep getting this error after inserting a subdatasheet into a query and trying to
I've got a hibernate query I'm trying to get working but keep getting an
hello all im back with another question on my project. i keep getting stuck
We are getting some unexpected results randomly from some servers when trying to open
I keep getting an syntax error during runtime when this query is called. adoquery1.Active
I keep getting this error from my code and I have no idea what
I keep getting this error and i have been trying everything for about a
Keep getting these errors while trying to compile an c++ class program. testStock.cpp: In
I'm trying to use HibernateDaoSupport but I'm getting stuck with a org.hibernate.LazyInitializationException problem. This
I am trying to build and sign an app manually, but I keep getting

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.