Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15120
| From | bill <william@TechServSys.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: php array bracket method |
| Date | 2015-03-20 13:50 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mehmli$ehr$1@speranza.aioe.org> (permalink) |
| References | <y0xu9l62012g.190fnsidhx2h5$.dlg@40tude.net> <n67y1u3e5xl5.13fpn6e2c5ypi$.dlg@40tude.net> |
On 3/20/2015 1:11 PM, richard wrote: > On Fri, 20 Mar 2015 13:03:31 -0400, richard wrote: > >> The standard method to align bracketed arrays on a page is: >> >> $arr['1']="val"; >> $arr['2']="val"; >> >> Neither w3schools nor php.net shows how to apply these two items on a >> single line. >> >> Possible ways are >> 1) $arr['1']="val"; $arr['2']="val"; >> 2) $arr['1']="val";, $arr['2']="val"; >> >> My server has php 5.5. >> >> Which would be best to use? > > answering my own question with a test file, it is apparently option 1 that > works. > The comma generates an error. > Good progress Richard. Now to real progress, make your simple test cases BEFORE you write the group. FYI, the php interpreter doesn't care at all about line endings unless they are within quotes. You could write an entire php script on one line, but it would not be a best practice. bill
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
php array bracket method richard <noreply@example.com> - 2015-03-20 13:03 -0400
Re: php array bracket method richard <noreply@example.com> - 2015-03-20 13:11 -0400
Re: php array bracket method bill <william@TechServSys.com> - 2015-03-20 13:50 -0400
csiph-web