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 #175078 is a reply to message #175077] Wed, 10 August 2011 21:19 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 3:48 PM, Bill B wrote:
> 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

Not if he wants to use json. Other than that, I have no idea what he's
trying to do. But if it requires execution on the client, then
obviously not. However, if it could all be done server-side, then it
easily could.

But reading between the lines, I suspect he's using AJAX to refresh part
of a page after a search is performed. I don't know, though, and could
be way off.

--
==================
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 10:43:02 GMT 2024

Total time taken to generate the page: 0.04741 seconds