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 #175089 is a reply to message #175088] Thu, 11 August 2011 22:42 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Paul Herber wrote:

> Thomas 'PointedEars' Lahn wrote:
>> 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?
>> RTFM: <http://php.net/json_encode> (there are examples there, too!)
>>
>> You would be well-advised to ignore Jerry Stuckle.
>
> I've learnt far more useful stuff from Jerry's posts than from anyone
> else's in this group. When he answers a question by directing the OP to
> another group he is always (FSVO always) right.

YMMV.

However, as you could have noticed, this is _not_ solely a JavaScript/JSON
question, as PHP has had a *built-in* function for creating JSON from PHP
arrays for quite some time (which is a Good Thing, as it spares you all the
looping and escaping). Subscribers of cljs, for example, do not need to
know that as there are various ways to create JSON. So that question is not
off-topic here, and it is not on-topic there.

Not knowing that (or knowing where to find it to give the correct answer)
but replying with somewhat correct, yet useless information nevertheless
("somewhat" because e.g., PHP is _not_ limited to the server side as
JavaScript is _not_ limited to the client side, and there is no "javascript"
to begin with – we have been over this) does _not_ count as a competent
answer in my book, and in my experience there have been few useful comments
from Jerry but a lot of unnecessarily rude and really useless ones by
comparison. Enough for me to ignore him (with one exception) and recommend
that to others similarly mistreated, which I usually do not do. Sorry, but
that's that.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
[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 08:30:55 GMT 2024

Total time taken to generate the page: 0.04386 seconds