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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:28:29+00:00 2026-06-06T10:28:29+00:00

I have the following PHP script with the working (according to JsonViewer ) JSON

  • 0

I have the following PHP script with the working (according to JsonViewer) JSON string:

<?php
$string = "{0:{'id':1,'name':'Antiek en Kunst','subs':[{'id':2,'name':'Antiek | Bestek'},{'id':3,'name':'Antiek | Boeken en Bijbels'},{'id':1100,'name':'Antiek | Emaille'},{'id':1501,'name':'Antiek | Gereedschap en Instrumenten'},{'id':1648,'name':'Antiek | Glas en Kristal'},{'id':2614,'name':'Antiek | Goud en Zilver'},{'id':2661,'name':'Antiek | Kandelaars'},{'id':1841,'name':'Antiek | Kantoor en Zakelijk'},{'id':1502,'name':'Antiek | Keramiek en Aardewerk'},{'id':1842,'name':'Antiek | Keukenbenodigdheden'},{'id':2118,'name':'Antiek | Kleden en Textiel'},{'id':1503,'name':'Antiek | Kleding en Accessoires'},{'id':6,'name':'Antiek | Klokken'},{'id':1647,'name':'Antiek | Koper en Brons'},{'id':7,'name':'Antiek | Lampen'},{'id':1504,'name':'Antiek | Meubels | Bedden'},{'id':5,'name':'Antiek | Meubels | Kasten'},{'id':1505,'name':'Antiek | Meubels | Stoelen en Banken'},{'id':1506,'name':'Antiek | Meubels | Tafels'},{'id':1101,'name':'Antiek | Naaimachines'},{'id':10,'name':'Antiek | Porselein'},{'id':1102,'name':'Antiek | Religie'},{'id':1103,'name':'Antiek | Schalen'},{'id':2662,'name':'Antiek | Schoolplaten'},{'id':1843,'name':'Antiek | Servies compleet'},{'id':12,'name':'Antiek | Servies los'},{'id':1507,'name':'Antiek | Speelgoed'},{'id':2663,'name':'Antiek | Spiegels'},{'id':2664,'name':'Antiek | Tin'},{'id':11,'name':'Antiek | Tv\'s en Audio'},{'id':14,'name':'Antiek | Vazen'},{'id':1104,'name':'Antiek | Wandborden en Tegels'},{'id':1500,'name':'Antiek | Woonaccessoires'},{'id':9,'name':'Antiek | Overige'},{'id':15,'name':'Curiosa en Brocante'},{'id':1423,'name':'Diensten | Kunstenaars en Portretschilders'},{'id':2610,'name':'Diensten | Reparatie en Onderhoud'},{'id':23,'name':'Kunst | Beelden en Houtsnijwerken'},{'id':1508,'name':'Kunst | Designobjecten'},{'id':1105,'name':'Kunst | Etsen en Gravures'},{'id':27,'name':'Kunst | Litho\'s en Zeefdrukken'},{'id':1844,'name':'Kunst | Niet-Westerse kunst'},{'id':1846,'name':'Kunst | Schilderijen | Abstract'},{'id':25,'name':'Kunst | Schilderijen | Klassiek'},{'id':1845,'name':'Kunst | Schilderijen | Modern'},{'id':26,'name':'Kunst | Tekeningen en Foto\'s'},{'id':24,'name':'Kunst | Overige'}]},1:{'id':31,'name':'Audio, Tv en Foto','subs':[{'id':2035,'name':'Accu\'s en Batterijen'},{'id':2617,'name':'Afstandsbedieningen'},{'id':32,'name':'Bandrecorders'},{'id':1132,'name':'Beamers'},{'id':2665,'name':'Blu-ray-spelers en Blu-ray-recorders'},{'id':33,'name':'Buizenversterkers'},{'id':2036,'name':'Cassettedecks'},{'id':35,'name':'Cd-spelers'},{'id':2666,'name':'Diaprojectors'},{'id':2042,'name':'Diensten | Film- en Videobewerking'},{'id':1199,'name':'Diensten | Fotografen'},{'id':1219,'name':'Diensten | Reparaties'},{'id':1114,'name':'Dvd-spelers en Dvd-recorders'},{'id':1115,'name':'Films 8mm, 16mm en 35mm'},{'id':1360,'name':'Fotografie | Accu\'s en Batterijen'},{'id':480,'name':'Fotografie | Camera\'s | Analoog'},{'id':487,'name':'Fotografie | Camera\'s | Digitaal'},{'id':2667,'name':'Fotografie | Digitale fotolijstjes'},{'id':488,'name':'Fotografie | Doka Toebehoren'},{'id':1720,'name':'Fotografie | Filters'},{'id':489,'name':'Fotografie | Flitsers'},{'id':1483,'name':'Fotografie | Fotolijsten en Fotoalbums'},{'id':1721,'name':'Fotografie | Fotoprinters en Fotopapier'},{'id':1400,'name':'Fotografie | Fotostudio en Toebehoren'},{'id':1484,'name':'Fotografie | Fototassen'},{'id':493,'name':'Fotografie | Geheugenkaarten'},{'id':495,'name':'Fotografie | Lenzen en Objectieven'},{'id':497,'name':'Fotografie | Onderwatercamera\'s'},{'id':501,'name':'Fotografie | Professionele apparatuur'},{'id':500,'name':'Fotografie | Statieven en Balhoofden'},{'id':1722,'name':'Harddiskrecorders'},{'id':1116,'name':'Home Cinema-sets'},{'id':1106,'name':'Kabels'},{'id':37,'name':'Koptelefoons en Headsets'},{'id':38,'name':'Luidsprekers'},{'id':2668,'name':'Mediaspelers'},{'id':40,'name':'Mp3-spelers | Apple iPod'},{'id':1649,'name':'Mp3-spelers | Overige merken'},{'id':1723,'name':'Mp3-spelers | Accessoires | Apple iPod'},{'id':1452,'name':'Mp3-spelers | Accessoires | Overige merken'},{'id':2615,'name':'Mp4-spelers'},{'id':1724,'name':'Opladers'},{'id':496,'name':'Optische apparatuur | Microscopen'},{'id':502,'name':'Optische apparatuur | Telescopen'},{'id':503,'name':'Optische apparatuur | Verrekijkers'},{'id':42,'name':'Platenspelers en Pick-ups'},{'id':1117,'name':'Professionele Audio-, Tv- en Video-apparatuur'},{'id':43,'name':'Radio\'s'},{'id':36,'name':'Stereo-sets'},{'id':45,'name':'Tuners'},{'id':1118,'name':'Tv-decoders en Schotelantennes'},{'id':1120,'name':'Tv\'s | Plasma, Lcd en Led'},{'id':1121,'name':'Tv\'s | Overige Tv\'s'},{'id':1453,'name':'Tv\'s | Accessoires'},{'id':46,'name':'Versterkers en Receivers'},{'id':1129,'name':'Videobewakingsapparatuur'},{'id':1130,'name':'Videocamera\'s | Analoog'},{'id':1131,'name':'Videocamera\'s | Digitaal'},{'id':1133,'name':'Videospelers en Videorecorders'},{'id':47,'name':'Walkmans, Discmans en Minidiscspelers'},{'id':1725,'name':'Weerstations en Barometers'},{'id':41,'name':'Overige Audio, Tv en Foto'}]}}";

var_dump(json_decode($string)); // returns null
?>

Why does this give me null?

  • 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-06T10:28:31+00:00Added an answer on June 6, 2026 at 10:28 am

    Short answer: Not a valid Json.

    According to the state machine diagram on the JSON website, only escaped double-quote characters are allowed, not single-quotes. Single quote characters do not need to be escaped
    read more : http://www.json.org/

    enter image description here

    For your reference, you can also validate your JSON quickly here

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

Sidebar

Related Questions

i have the following simple script <input class=input type=text name=password style=color: #797272; value= <?php
I have the following PHP script: <?php $vote_type = $_GET['type']; $book = $_GET['book']; $id
I have the following PHP script: <?php $fortune = `fortune`; echo $fortune; ?> but
I have the following code validation php script: if(empty($_POST['captcha_code'])) { $error = 1; $code[3]
I have the following function in a PHP script, which returns and API call:
I have the following situation. I have a PHP script that imports a CSV
I have the following script validation.php <?php if(!isset($_SESSION['userId'])){ session_destroy(); header('Location: home.php'); exit; } ?>
I have a PHP script that does the following: Uses file_get_contents() to get content
I have the following jqGrid script: jQuery(#editgrid).jqGrid({ url: editing.php?q=1, datatype: xml, // ... Where
i have following script in php to login to mysql $db_host=localhost; $db_user=root; $db_pass=123; $dbc=mysql_connect($db_host,$db_user,$db_pass)

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.