[FX.php List] Re: Self-relationship

Andy Gaunt andy at fmpug.com
Thu Sep 29 08:24:58 MDT 2005


Anthony,

Instead of a foreach loop have you looked at creating just a for loop and
increment with a counter. Then you can reference the correct portal record
using the $counter in place of the repetition number (or portal row number)



for($counter=0; $counter < count($recordData['SELF_scimage::Image_Number']);
$counter++) {

	echo $recordData['SELF_scimage::Image_Number'][$counter].'<br />';
}



Andy Gaunt
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com

Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award
 
October 27th 2005, 6pm Orlando FMPug - It's the Post DevCon show.
For other chapter locations, dates & times please visit the website at
http://www.fmpug.com
If you can make it to a meeting, please RSVP at
http://www.fmpug.com/rsvp.php


-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Anthony Talo
Sent: Thursday, September 29, 2005 10:15 AM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] Re: Self-relationship

OK, I'm making progress....

this:
echo $recordData['SELF_scimage::Image_Number'][0];  --returns the first 
item in the portal

this:
echo $recordData['SELF_scimage::Image_Number'][1]; -- returns the 
second, etc. ,etc.

this:
$sec_array = ($recordData['SELF_scimage::Image_Number']);
foreach( $sec_array as $key=>$value )
			                         {
			                               echo $value;
			                         }
--gives me ...

  DTM_14275DTM_14275_BloodSugarDTM_14275_PageLocatorDTM_14275_shopguide

How do I get it to display..
DTM_14275
DTM_14275_BloodSugar
DTM_14275_PageLocator
DTM_14275_shopguide

I tried.... echo $value[0];


and got back...

DDDD

So I'm almost there - help?

Cheers,
Tony

_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list