[thelist] mysql table field - storing multiple values - solved

Renoir Boulanger renoirb at gmail.com
Fri Aug 24 07:03:25 CDT 2012

That's it.

What I recommend is that you use the json_decode() second argument which serves to switch to an array instead of 'instanceof stdClass'

json_decode is ideal as an encoding method when your class implements Serializable. But that's OOP and in your case array should be enough.


  Joomla do not, yet (!!!!), use Object-Oriented. As in similar to Java and C#. Have a look at php-fig.org  it's a workfroup redefining interoperability and next Joomla! big change will be that they are using Symfony2 as the underlying framework.

Big changes are coming ahead.

Renoir Boulanger

(envoyé de mon téléphone)

Em 2012-08-23, às 22:48, Bob Meetin <bobm at dottedi.biz> escreveu:

> JSON = ($row['extra_fields']); // the mysql query field
> $obj = json_decode($JSON);
> $f2 = $obj[1]->value;
> echo $f2;
> Thank you both, this got me in the right direction. I then did a google on 'k2 decode json extra fields'. k2 is the joomla component employing this technique
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt ! 

More information about the thelist mailing list