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
to fill a select with json javascript from arrays [message #175072] Wed, 10 August 2011 12:13 Go to previous message
nawfer is currently offline  nawfer
Messages: 34
Registered: August 2011
Karma:
Member
in JSON/javascript if I have 3 php’s array, how can insert their values in
3 selects?
the select also must to be dependant; example Car Brand->Car
Model->Accessories
I look guide but cannot understand how solve the problem


ARRAY BRAND
brand[01]='Brand 1';
....
brand[20]='Brand 20';

ARRAY MODEL (every brand have 3 models,total 60 models)
model[01][m01]=’model m01 of brand 1’;
model[01][m02]=’model m02 of brand 1’;
....
model[20][m59]=‘model m59 of brand 20’;
model[20][m60]=‘model m60 of brand 20’;

ARRAY ACCESSORIES (every models can to have n accessories; exmpl. m01-> 3
accessories,
m60 -> 2 access.)
accessories[m01][]=‘accessories 1 of model m01’;
accessories[m01][]=‘accessories 2 of model m01’;
accessories[m01][]=‘accessories 3 of model m01’;
……..
accessories[m60][]=‘accessories 1 of model m60’;
accessories[m60][]=‘accessories 2 of model m60’;
[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:27:40 GMT 2024

Total time taken to generate the page: 0.06602 seconds