Re: Thinking out loud - a continuation...

From: Date: Mon, 02 Apr 2012 21:07:38 +0000
Subject: Re: Thinking out loud - a continuation...
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.general 
Request: Send a blank email to php-general+get-317430@lists.php.net to get a copy of this message
On 12-04-02 04:36 PM, Jay Blanchard wrote:
[snip]
function getTiersJson( $company ) {
    $tiers = getTiers( $company );
    $json = JSON_encode( $tiers );
} $tiersJson = getTiersJson( 1 ); ?> This will output JSON with the following structure:
[/snip] OK, now I know I am being dense - but don't I have to add return $json; to getTiersJson() ?
yeah, *lol* in my testing I had a print_r() in the getTiersJson() so didn't notice I wasn't returning since I didn't do anything with the captured value (null without a proper return). Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.

« previous php.general (#317430) next »