Re: to fill a select with json javascript from arrays [message #175076 is a reply to message #175075] |
Wed, 10 August 2011 17:26 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
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.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|