[FX.php List] Return original & duplicated record
Denis Somar
dsomar at gmail.com
Wed Jan 11 20:51:51 MST 2012
Tim,
As always, you are a scholar and a gentleman. This worked perfectly,
thanks for your help and for opening my eyes!!
Best,
Denis
On Wed, Jan 11, 2012 at 4:39 PM, Tim 'Webko' Booth <tim at nicheit.com.au>wrote:
>
> On 12/01/2012, at 1:52 AM, Denis Somar wrote:
>
> Thanks again!
>>
>> I'm understanding that now. My issue is as to how I can retrieve it. I
>> have one snippet of code that retrieves it in a foreach loop:
>>
>> foreach($r['data'] as $key=>$searchData){
>> $recordDetails=explode('.',$**key);
>> $recid=$recordDetails[0];
>> }
>>
>> I understand why the above works, but I don't understand how to get that
>> same info in my primary work loop:
>>
>> foreach($r['data']as $record) {
>> // Doing the usual tedium of loops here
>> $record['myfield'][0]
>> }
>>
>
> The first is actually creating an array $searchData, the second $record,
> so I think this will work:
>
>
> foreach($r['data'] as $key=>$searchData){
> $recordDetails=explode('.',$**key);
> $recid=$recordDetails[0];
> $searchData['myField'][0];
> }
>
> (As it so happens, I tend to use descriptive names for every record set
> anyway - make debugging later a lot easier in my book)
>
> Cheers
>
>
> T
>
>
> ______________________________**_________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/**mailman/listinfo/fx.php_list<http://www.iviking.org/mailman/listinfo/fx.php_list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120111/b9d77060/attachment.html
More information about the FX.php_List
mailing list