News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ProDevTips Blog:
Fluent Arrays and Strings in PHP - Adding JSON and more
July 17, 2008 @ 09:32:26

Henrik continues his look at fluent arrays and strings in PHP with this second part of his series, adding JSON functionality into the mix.

Recently I've had the need to extend the interface further, among other things with JSON support. I've used code published by Nicolas Crovatti to do this.

His example shows how the script works to plot out some points for a table of stats. He follows this with an in-depth look at the different methods making up that fluent call (apply2Field, fill_ret, sum and plot). These make the array that can then be passed off to PHP, using json_encode to make an easy-consumable JSON message out of the results.

0 comments voice your opinion now!
json fluent array string php5 tutorial jsonencode


blog comments powered by Disqus

Similar Posts

Dan Scott's Blog: Creating a MARC record from scratch in PHP using File_MARC

MaltBlue.com: \Zend\Db\Sql - Creating Joins and Unions with Ease

SitePoint PHP Blog: Social Network Authentication - Setup & Google+

SitePoint PHP Blog: Creating a Subscription-Based Website with Laravel and Recurly, Part 1

PHPFreaks.com: Template based document generation using LiveDocx and Zend Framework


Community Events





Don't see your event here?
Let us know!


list api community conference voicesoftheelephpant bugfix framework developer zendserver introduction podcast language release symfony interview tips library series deployment laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework