Re: to fill a select with json javascript from arrays [message #175077 is a reply to message #175076] |
Wed, 10 August 2011 19:48 |
me
Messages: 192 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 8/10/2011 1:26 PM, Jerry Stuckle wrote:
> On 8/10/2011 12:16 PM, nawfer wrote:
>>> This is actually a JavaScript/JSON question.
>>
>> but in the first step how can take the array php and have array js?
>> I read json is solution but which is the correct code that can to work
>> with
>> my type of php array?
>
> You have to understand - PHP runs on the server, and javascript on the
> client. By the time your javascript code executes, PHP has completed its
> execution and terminated.
>
> So what you have to do in your PHP code is create the javascript code to
> build the array then send the javascript code to the client.
Jerry, out of curiosity, with the information you have, is there
solution that is only PHP?
Bill B
|
|
|