180 links
  • BigBrainBag
  • Home
  • Login
  • RSS Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
5 results tagged good x
  • Good Sales Emails
    Tue May 23 20:00:01 2017 - permalink -
    QRCode
    - archive.org - http://goodsalesemails.com/
    email emails good marketing sales
  • Modern JavaScript for Ancient Web Developers – Track Changes
    https://github.com/verekia/js-stack-from-scratch/blob/master/tutorial/02-babel-es6-eslint-flow-jest-husky.md#readme
    Sun Mar 26 22:17:35 2017 - permalink -
    QRCode
    - archive.org - https://trackchanges.postlight.com/modern-javascript-for-ancient-web-developers-58e7cae050f9#.tgaae7zh6
    express good guide javascript js learn node stack
  • json - PHP "pretty print" json_encode - Stack Overflow
    189
    down vote
    accepted
    PHP has JSON_PRETTY_PRINT option since 5.4.0 (release date 01-Mar-2012).

    This should do the job:

    $json = json_decode($string);
    echo json_encode($json, JSON_PRETTY_PRINT);
    See http://www.php.net/manual/en/function.json-encode.php

    Note: Don't forget to echo "<pre>" before and </pre> after, if you're printing it in HTML ;)

    shareimprove this answer
    answered Nov 30 '12 at 4:27

    petrkotek
    2,55211014
    10  
    In PHP <5.4 replace JSON_PRETTY_PRINT with 128 – Nic Cottrell Aug 19 '14 at 13:36
    1  
    @NicCottrell doesn't work when i test it here sandbox.onlinephpfunctions.com/code/… – drzaus Aug 28 '14 at 5:15
        
    @drzaus works for me there - I can see each key of JSON on separate line (the PHP version used on that site has even JSON_PRETTY_PRINT defined. – petrkotek Aug 28 '14 at 6:07
        
    @beret ahh, I thought sharing it would retain the PHP setting -- change the php version to anything less than 5.4 and it should go back to "unformatted" – drzaus Aug 28 '14 at 13:29
    3  
    Thank you for the <pre>json</pre> tip! – GisMofx Feb 18 '16 at 4:05
    show 2 more comments
    up vote
    11
    down vote
    Hmmm $array = json_decode($json, true); will make your string an array which is easy to print nicely with print_r($array, true);

    But if you really want to prettify your json... Check this out

    shareimprove this answer
    answered Aug 17 '11 at 18:12

    sg3s
    7,82022348
        
    +1 for print_r – Michael Mior Aug 17 '11 at 19:35
        
    @Michael Mior you should see my debugging die die(print('<pre>'.print_r($var, true).'</pre>')) it prints almost anything :p – sg3s Aug 17 '11 at 19:38
    1  
    I usually just view the source and go with var_dump, but whatever works :) – Michael Mior Aug 17 '11 at 21:09
    add a comment
    up vote
    4
    down vote
    Here's a function to pretty up your json: pretty_json
    Fri Mar 17 16:57:26 2017 - permalink -
    QRCode
    - archive.org - http://stackoverflow.com/questions/7097374/php-pretty-print-json-encode
    code debug dev dump good important json php pretty print_r
  • security-101-for-saas-startups/security.md at master · forter/security-101-for-saas-startups · GitHub
    Explore
    Tue Mar 14 11:22:42 2017 - permalink -
    QRCode
    - archive.org - https://github.com/forter/security-101-for-saas-startups/blob/master/security.md
    github good guide saas security startup
  • Tutorialzine Newsletter
    Fri Mar 10 11:54:40 2017 - permalink -
    QRCode
    - archive.org - http://tutorialzine.com/newsletter/w/7633tN763hn8922mnDomOErf3kfg/PYJt4cw3rGUTSKDTdf2r5A/HUeqsbABB4HQwb4ZKZllnA
    dev good guides libs php resources web
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation