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 #175076 is a reply to message #175075] Wed, 10 August 2011 17:26 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  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
==================
[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: Tue Nov 26 11:44:47 GMT 2024

Total time taken to generate the page: 0.05067 seconds