[thelist] Php array, best way to...
jsWalter
jsWalter at torres.ws
Tue Jul 13 17:33:42 CDT 2004
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Diane Soini
> Sent: Tuesday, July 13, 2004 4:48 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Php array, best way to...
>
>
> On Tuesday, July 13, 2004, at 01:48 AM,
>
> This will probably be a silly answer because I'm not a programmer and
> certainly not a PHP expert, but here goes...
>
> I'm thinking about how the original array of records could be
> constructed to allow you to get out what you are looking for down the
> line.
>
> As a visual thinker I imagine an HTML table.
I'm visualizing it as a grid
Rows and columns.
Even though its not really.
> Imagining (kind of translating it in my visual mind) it in
> javascript, I would probably make my array of arrays an array
> of Objects (yeah, an array is an Object...I know).
$cvsRecords = <master array>
$_colNum = <what column of data to get>
$_results = array(); // drop results here
for ($i = 0; $i < $recordCount; $i++)
$_results[] = $cvsRecords[$i][$_colNum];
> Don't know if this is anywhere near to being of any use, and it
> probably isn't if I was able to think it up. Plus I don't know
> if PHP will behave similarly. I imagine that it might.
Close enough for government work. ;)
If you know JS pretty good, you can pickup PHP with no problem.
Thanks for your thoughts.
Walter
More information about the thelist
mailing list