Hi everyone! I'm the author of code.mu :)
I'd love to chat with my non-Russian audience. I'm looking for your feedback on the site and the translation quality. Let's chat:)
⊗ppSpJnTD 15 of 83 menu

Konvertering af data fra JSON til PHP

Med funktionen json_decode kan man automatisk konvertere data fra JSON-format til PHP-strukturer. Lad os se på et eksempel. Lad os antage, at vi har følgende JSON:

<?php $json = '[1, 2, 3]'; ?>

Lad os konvertere dataene til PHP:

<?php $data = json_decode($json); ?>

Lad os se, hvad vi fik:

<?php var_dump($data); // array [1, 2, 3] ?>

Konverter følgende JSON til en PHP-struktur:

<?php $json = '[ "x", "y", "z" ]'; ?>
Dansk
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDeutschΕλληνικάEnglishEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
Vi bruger cookies til webstedets funktion, analyse og personalisering. Behandling af data foregår i henhold til Fortrolighedspolitikken.
accepter alle tilpas afvis