Re: Array in PHP to JSON

2008-04-03 Thread hydra12
Check out this slide presentation: http://www.thinkingphp.org/2008/02/26/with-jquery-cakephp-to-world-domination-slides/ On slide 31, it gives you a function for your app controller called setJson. On slide 32, it shows how to use setJson in your controller. On slide 33, it shows the code to put

Re: Array in PHP to JSON

2008-04-03 Thread Tom
Sure that's not the problem here. I don't know how to get back my array in my JQuery function (in my JS file). Something that might looklike this : {name:'!', width:120, editable: true, edittype: "select", editoptions: {value:$Array}} I don't know the syntaxis --~--~-~--~~

Re: Array in PHP to JSON

2008-04-03 Thread Tom
Thanx, but i would like to use it with Jquery. I have a filled array in php, and in a js file i've got : jQuery(document).ready( function() { var lastsel; jQuery("#list2").jqGrid( { url:'/comms/grid', datatype: "json", colNames:['!'

Re: Array in PHP to JSON

2008-04-03 Thread grigri
> Hi, i would like to know how to transfer an array in PHP to JSON ? and > see it with JSON Google not working? http://api.cakephp.org/1.2/class_javascript_helper.html#d349233dd9dd9a6e7b5234fa268a9a40 > JavascriptHelper::object() > Generates a JavaScript object in JavaScript Obj

Re: Array in PHP to JSON

2008-04-03 Thread Chris Hartjes
On Thu, Apr 3, 2008 at 9:26 AM, Tom <[EMAIL PROTECTED]> wrote: > > Hi, i would like to know how to transfer an array in PHP to JSON ? and > see it with JSON http://ca.php.net/json -- Chris Hartjes Internet Loudmouth Motto for 2008: "Moving from herding elephant

Array in PHP to JSON

2008-04-03 Thread Tom
Hi, i would like to know how to transfer an array in PHP to JSON ? and see it with JSON --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email t