Re: [WebDNA] Array for Dummies

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104589
interpreted = N
texte = Hi Lawrence! i suppose you already read the WebDNA references at = http://www.webdna.us/page.dna?numero=3D84 - chris On Jan 26, 2010, at 7:28, Lawrence Banahan wrote: > Hi, >=20 > Can't any body help me with this... >=20 > Is Array in PHP like Array in Webdna? >=20 > Thanks in advance >=20 > Lawrence >=20 >=20 >=20 > D=E9but du message r=E9exp=E9di=E9 : >=20 >> De : Lawrence >> Date : 21 janvier 2010 09:50:30 HNEC >> =C0 : talk@webdna.us >> Objet : [WebDNA] Array for Dummies >> R=E9pondre =E0 : >>=20 >> Hi, >>=20 >> I have never used [ArraySet] and [ArrayGet], I'm trying to understand = it but it is a litlle obscure to me... >> I have found a JQuery script that would save me a lot of = time,(http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuer= y/) but it is linked to a PHP file. >> I'm trying to create my own TPL file. >> If there is a PHP Guru who could help me understand how to convert = the following code to some nice Webdna... >> I have started with something looking like that : >> [search db=3D../admin/clubs.db&neLIGUEdata=3DFINDALL®IONsumm=3Dt] >> [arrayset name=3Dregion&dim=3D2,[numfound]] >> [founditems]([SKU])=3D[region] >> [/founditems][/arrayset] >> [/search] >>=20 >>=20 >> Thanks in advance >> Lawrence >> > $array =3D array(); >> if ($_GET['_name'] =3D=3D 'country')=20 >> { >> if ( $_GET['_value'] =3D=3D 3 )//usa >> { >> $array[] =3D array('1' =3D> 'Montana'); >> $array[] =3D array('2' =3D> 'New York'); =20 >> $array[] =3D array('3' =3D> 'Texas'); =20 >> } else >> { >> $array[] =3D array('0' =3D> 'No state'); >> } >> } elseif ($_GET['_name'] =3D=3D 'state')=20 >> { >> if ( $_GET['_value'] =3D=3D 2 )//New York >> { >> $array[] =3D array('1' =3D> 'New York'); >> $array[] =3D array('2' =3D> 'Another city'); =20= >> } else >> { >> $array[] =3D array('0' =3D> 'No city'); >> } >> } else >> { >> $array[] =3D array('1' =3D> 'Data 1'); >> $array[] =3D array('2' =3D> 'Data 2'); =20 >> $array[] =3D array('3' =3D> 'Data 3'); =20 >> } >> echo json_encode( $array ); >> ?> >>=20 >=20 Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Array for Dummies [solved] (Govinda 2010)
  2. Re: [WebDNA] Array for Dummies [solved] (Dan Strong 2010)
  3. Re: [WebDNA] Array for Dummies [solved] (Lawrence 2010)
  4. Re: [WebDNA] Array for Dummies (Lawrence 2010)
  5. Re: [WebDNA] Array for Dummies (Toby Cox 2010)
  6. Re: [WebDNA] Array for Dummies (christophe.billiottet@webdna.us 2010)
  7. Re: [WebDNA] Array for Dummies (Toby Cox 2010)
  8. Fwd: [WebDNA] Array for Dummies (Lawrence Banahan 2010)
  9. [WebDNA] Array for Dummies (Lawrence 2010)
Hi Lawrence! i suppose you already read the WebDNA references at = http://www.webdna.us/page.dna?numero=3D84 - chris On Jan 26, 2010, at 7:28, Lawrence Banahan wrote: > Hi, >=20 > Can't any body help me with this... >=20 > Is Array in PHP like Array in Webdna? >=20 > Thanks in advance >=20 > Lawrence >=20 >=20 >=20 > D=E9but du message r=E9exp=E9di=E9 : >=20 >> De : Lawrence >> Date : 21 janvier 2010 09:50:30 HNEC >> =C0 : talk@webdna.us >> Objet : [WebDNA] Array for Dummies >> R=E9pondre =E0 : >>=20 >> Hi, >>=20 >> I have never used [ArraySet] and [ArrayGet], I'm trying to understand = it but it is a litlle obscure to me... >> I have found a JQuery script that would save me a lot of = time,(http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuer= y/) but it is linked to a PHP file. >> I'm trying to create my own TPL file. >> If there is a PHP Guru who could help me understand how to convert = the following code to some nice Webdna... >> I have started with something looking like that : >> [search db=3D../admin/clubs.db&neLIGUEdata=3DFINDALL®IONsumm=3Dt] >> [arrayset name=3Dregion&dim=3D2,[numfound]] >> [founditems]([SKU])=3D[region] >> [/founditems][/arrayset] >> [/search] >>=20 >>=20 >> Thanks in advance >> Lawrence >> > $array =3D array(); >> if ($_GET['_name'] =3D=3D 'country')=20 >> { >> if ( $_GET['_value'] =3D=3D 3 )//usa >> { >> $array[] =3D array('1' =3D> 'Montana'); >> $array[] =3D array('2' =3D> 'New York'); =20 >> $array[] =3D array('3' =3D> 'Texas'); =20 >> } else >> { >> $array[] =3D array('0' =3D> 'No state'); >> } >> } elseif ($_GET['_name'] =3D=3D 'state')=20 >> { >> if ( $_GET['_value'] =3D=3D 2 )//New York >> { >> $array[] =3D array('1' =3D> 'New York'); >> $array[] =3D array('2' =3D> 'Another city'); =20= >> } else >> { >> $array[] =3D array('0' =3D> 'No city'); >> } >> } else >> { >> $array[] =3D array('1' =3D> 'Data 1'); >> $array[] =3D array('2' =3D> 'Data 2'); =20 >> $array[] =3D array('3' =3D> 'Data 3'); =20 >> } >> echo json_encode( $array ); >> ?> >>=20 >=20 christophe.billiottet@webdna.us

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Summing fields (1997) WebDNA 6.0 & MAC OS X Server 10.4.10 (2007) [WebDNA] Snow Leoopard and v7 (2011) Add to Cart & List of Products (1997) Using Applescript to process WebCatalog functions (1998) Banners (1997) webcat2b12 CGI -- Date comparisons (1997) [WebDNA] Brian Harrington (2019) [WebDNA] StoreBuilder (2013) How To Install (2003) YACBQ.....(Yet another checkbox question) (2000) SetHeader Requirements (2002) Running 2 two WebCatalog.acgi's (1996) SiteGuard Use Question (1997) More on [purchase] (1998) Title not showing up in ViewOrder template (1998) Just Started (1998) [WebDNA] OT: Translation Services (2008) Secure Server (1997) Include a big block of text (1997)