Re: There's got to be a better way
- From: Mary Pegg <invalid@xxxxxxxxxxx>
- Date: Sun, 25 Mar 2007 20:37:17 GMT
shimmyshack wrote:
if (isset($c['s']['a5'])) echo htmlentities($c['s']['a1'])."<br>";
.
.
.
if (isset($c['s']['a5'])) echo htmlentities($c['s']['a5'])."<br>";
that's alot of work for sake of sticking with what _you_ find more
readable
So what you're really arguing in favour of is wrapping it up in a
function, which is what I've done. But the question is whether it's
worth creating a for loop to run through a1 to a5 rather than simply
calling each by name.
all the chages above and more are so simple with Rani's method. If you
No, they're simple if it's wrapped up in a function. Whether or not
a1 to a5 get generated by a for loop I've still got b, c, d, e, f (etc)
to deal with. NB I'm using these as symbols - in reality they are the
field names from a database, so no getting smart and suggesting that I
can generate b to f automagically. OTOH I could stick the field names
in an array and step through the array. This might be worth doing.
can't take good advice don't ask for it.
I know this is Usenet but you don't *have* to be rude and abrasive.
--
"Checking identity papers is a complete waste of time. If anyone can
be counted on to have valid papers, it will be the terrorists".
.
- Follow-Ups:
- Re: There's got to be a better way
- From: shimmyshack
- Re: There's got to be a better way
- References:
- There's got to be a better way
- From: Mary Pegg
- Re: There's got to be a better way
- From: Snahad00
- Re: There's got to be a better way
- From: Rami Elomaa
- Re: There's got to be a better way
- From: Mary Pegg
- Re: There's got to be a better way
- From: shimmyshack
- There's got to be a better way
- Prev by Date: Re: PHP - Reading Live Text Log ?
- Next by Date: Tree functions
- Previous by thread: Re: There's got to be a better way
- Next by thread: Re: There's got to be a better way
- Index(es):
Relevant Pages
|