b/c the do-while was nested inside your original document.
I need a means to pass an object to a function, so I can
re-use the
recordset, w/o knowing which recordset it is.
I'll take another look, Murray, after I get back from lunch.
I'm starving
and distracted by it. it's possible your code will work -
just let me take
another look at it.
Thanks for having a go!
Jon
"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote
in message
news:eho5ot$s7p$1@forums.macromedia.com...
> In the code I gave you, $categories[$i][0] would contain
all of the
> recordset's values for each value of $i up to the number
of records, no?
> Why can't you manipulate that?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "crash" <crash@bcdcdigital.com> wrote in message
> news:eho4s6$r1d$1@forums.macromedia.com...
>>I tried that, can't pass it to a function outside of
the page? Unless I
>>made a mistake I'm not catching - I made these files
almost a month ago, I
>>think.
>>
>> What I have is this:
>>
>> inside my page
>> do/while that feeds my data to outside functions,
which then populate the
>> html inside the do/while loop.
>>
>> do
>> set data up through outside functions
>> while
>>
>> What I would much rather do is have a single
function on my page, so
>>
>> create_listing($recordset);
>>
>> but I don't seem to be able to pull a "recordset
block" out of the page
>> and into my functions.
>>
>> Does that make sense?
>>
>> Jon
>> "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote in message
>> news:eho3rp$pq5$1@forums.macromedia.com...
>>> Multi-dimensional even -
>>>
>>> do {
>>> foreach ($row_rsCategory as $value) {
>>> $categories[][0] = $value;
>>> }
>>> } while($row_rsCategory =
mysql_fetch_assoc($rsCategory));
>>>
>>>
>>> --
>>> Murray --- ICQ 71997575
>>> Adobe Community Expert
>>> (If you *MUST* email me, don't LAUGH when you do
so!)
>>> ==================
>>>
http://www.dreamweavermx-templates.com
- Template Triage!
>>>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>>>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>>>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
>>> ==================
>>>
>>>
>>> "crash" <crash@bcdcdigital.com> wrote in
message
>>> news:eho3mc$pgi$1@forums.macromedia.com...
>>>> David-
>>>>
>>>> Can you think of a quick easy way to put
this in an external function?
>>>>
>>>> I was wanting to have a file which would
take a recordset from a page,
>>>> then create an array (from a function), then
spit back the array so
>>>> that I could work with one array within the
page. Does that sound
>>>> do-able or just overly complicated?
>>>>
>>>>
>>>>> You need to extract each row from your
recordset with a loop in the
>>>>> same way as a Dreamweaver repeat region
does.
>>>>>
>>>>> <?php
>>>>> do {
>>>>> foreach ($row_rsCategory as $value) {
>>>>> echo $value."<br>";
>>>>> }
>>>>> } while($row_rsCategory =
mysql_fetch_assoc($rsCategory));
>>>>> ?>
>>>>>
>>>>>
>>>>> --
>>>>> David Powers
>>>>> Adobe Community Expert
>>>>> Author, "Foundation PHP for Dreamweaver
8" (friends of ED)
>>>>>
http://foundationphp.com/
>>>>
>>>>
>>>
>>>
>>
>>
>
>