FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » to fill a select with json javascript from arrays
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: to fill a select with json javascript from arrays [message #175077 is a reply to message #175076] Wed, 10 August 2011 19:48 Go to previous messageGo to previous message
me is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: json_decode
Next Topic: Calling stored procedure on remote SQL Server machine with PDO
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:19:27 GMT 2024

Total time taken to generate the page: 0.04098 seconds