How to convert a php array to JSON?

I have the following array and i want to convert it into json format so please help me.





Output :- ["apple","orange","papaya"]

But i want the output in the following format


Please help me out , i have used json_encode but i didn't got my expected result .

So , please suggest me , what will be the possible solution ?

Thanks in Advance !!!


Simply do this:

                       array(1=> "apple",

   echo json_encode($txt);





Need Your Help

Wpf - relative image source path

wpf image path

I'm having problems setting the source for images in my Wpf application. I have an Image where the source is bound to the SourceUri property of the DataContext object, like this:

Ext.Net 100% Width Layout

c# extjs

I started some days ago with Ext.NET (on MVC4 site) and I created some Forms with Ext.NET but I can't set 100% width to containers.