Re: php+html mixup in displaying multidimensional array in html tables [message #176868 is a reply to message #176867] |
Sun, 29 January 2012 22:41 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 1/29/2012 5:10 PM, Denis McMahon wrote:
> On Sun, 29 Jan 2012 15:09:41 -0500, Jerry Stuckle wrote:
>
>> This is from a MySQL query - multiple rows, all with the same number of
>> columns.
>
> I must have missed where the OP said that.
>
>>> 2) What if an array member is a binary object or a class?
>
>> See above.
>
>> Read the entire post. None of your arguments are valid.
>
> I checked the OP's post - it says nothing about the array being populated
> from a MySql query.
>
> In addition, even if it was populated from a MySql query, I don't know if
> any of the columns in the table(s) concerned are BLOBs.
>
> I did wonder if the "John Drako<jbravo556(at)gmail(dot)removethis(dot)com>" in the
> "Fast/Easy way to extract a column from multi-dimensional array?" thread
> was also the John "<John(at)agdp(dot)de>" in this thread, but wasn't actually
> assuming that he was.
>
> Rgds
>
> Denis McMahon
If any of the data were BLOBs, he would know it. He's also responsible
for putting data into the database. Completely immaterial in this case.
As for the array - he should also know the contents of the array and the
number of elements in each array.
Your comments are only valid if he had nothing to do with building the
array or its contents. Which he also didn't say.
The time to validate stuff is when it's being put into the array, and
validating the array as it is built. Then you don't have to worry about
complicated and hard-to-maintain code like you are suggesting.
The bottom line is - start with good data and coding is easy. Build
crap data and the code becomes much harder to understand and maintain
(needless to say adding a lot more bugs to the scripts).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|