Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2794
| Message-ID | <2509953.OE10fRJf03@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2011-08-12 00:42 +0200 |
| Subject | Re: to fill a select with json javascript from arrays |
| Newsgroups | comp.lang.php |
| References | <1bvj3wor4c13g.yba8pdm1yhnv$.dlg@40tude.net> <4e427ea9$0$23883$e4fe514c@news2.news.xs4all.nl> <17koe79k116aj.10mw3uyf7ueba$.dlg@40tude.net> <2378528.ArG6xLiZAS@PointedEars.de> <bgj8479phocl1vd6kmgtv7shluvjuh1m1s@news.eternal-september.org> |
| Followup-To | poster |
Followups directed to: poster
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@news.demon.co.uk>
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
to fill a select with json javascript from arrays nawfer <novalidsforspam@alt.al> - 2011-08-10 14:13 +0200
Re: to fill a select with json javascript from arrays Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-08-10 14:51 +0200
Re: to fill a select with json javascript from arrays nawfer <novalidsforspam@alt.al> - 2011-08-10 18:16 +0200
Re: to fill a select with json javascript from arrays Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-10 13:26 -0400
Re: to fill a select with json javascript from arrays Bill B <me@privacy.net> - 2011-08-10 15:48 -0400
Re: to fill a select with json javascript from arrays Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-10 17:19 -0400
Re: to fill a select with json javascript from arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-11 22:50 +0200
Re: to fill a select with json javascript from arrays Bill B <me@privacy.net> - 2011-08-11 17:05 -0400
Re: to fill a select with json javascript from arrays Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-11 19:53 -0400
Re: to fill a select with json javascript from arrays Bill B <me@privacy.net> - 2011-08-11 23:24 -0400
Re: to fill a select with json javascript from arrays Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-12 06:39 -0400
Re: to fill a select with json javascript from arrays Paul Herber <paul@pherber.com> - 2011-08-11 22:56 +0100
Re: to fill a select with json javascript from arrays Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-08-12 00:42 +0200
Re: to fill a select with json javascript from arrays Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-08-11 00:12 +0000
csiph-web