[FX.php List] Re: Self-Relationship
DC
dan.cynosure at dbmscan.com
Thu Sep 29 10:07:26 MDT 2005
oops, i forgot you can remove the array assign step to make it a oneliner:
now, that's elegant and readable.
<?php
echo implode('<br />',$recordData['SELF_scimage::Image_Number']);
?>
dan
DC had written:
> is this more 'elegant'?
>
> <?php
> $sec_array = ($recordData['SELF_scimage::Image_Number']);
> echo implode('<br />',$sec_array);
> ?>
>
> php's array handling functions are pretty comprehensive - especially if
> you are in php5 or you dig into the comments on the manual pages. i like
> to use them in place of loops whenever possible.
>
> dan
>
> Anthony Talo had written:
>
>> I did it! Since I'm on digest - thanks to all who (may have) posted.
>> Here is my solution:
>>
>> <?php
>> $sec_array = ($recordData['SELF_scimage::Image_Number']);
>> for ( $i=0; $i < count($sec_array); $i++ )
>> {
>> echo $recordData['SELF_scimage::Image_Number'][$i];
>> echo '<br />';
>> }
>> ?>
>>
>>
>> If there is a more elegant solution - please - let me know :-)
>>
>> Cheers,
>> Tony
>>
>>
>>
>> ---
>> Anthony Talo
>> Digital Wrangler
>> Salient Technologies, Inc.
>> tony at salienttech.com
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> 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