[FX.php List] Record Count after the fact
Bob Patin
bob at patin.com
Fri Feb 16 09:08:05 MST 2007
Jonathan,
Try this:
<?
$temphtml =''; //set my variable for collecting the html
foreach($searchResult['data'] as $key => $value) {
$temphtml = $temphtml;
?>
<tr><td>blah</td></tr>
<tr><td><?php if(empty($value['flag'][0] )) { echo "$".$value
['price'][0]; }else{ echo "Call"; }?>
<tr><td>blah</td></tr>
<?php
}
?>
Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
CONTACT US VIA INSTANT MESSAGING:
AIM or iChat: longterm1954
Yahoo: longterm_solutions
MSN: tech at longtermsolutions.com
ICQ: 159333060
>>
>> On Feb 15, 2007, at 10:53 AM, Jonathan Schwartz wrote:
>>
>>> I could do that. However, that would then add a second for loop:
>>> one to reduce the data set and write the results to an array and
>>> one to write the array for display...in addition to the FMP
>>> query. (Hey guys....do you believe that this kind of talk is
>>> coming from me...former beginner. ;-) ).
>>>
>>> Seems that this is particularly resource intensive, No?
>>>
>>> Jonathan
>>>
>>>
>>>
>>> At 11:25 AM -0500 2/15/07, Andy Gaunt wrote:
>>>> Jonathan,
>>>>
>>>> Rather than do a new page, can you do your for loop outside the
>>>> HTML first
>>>> (writing everything to a new variable) then echoing this to your
>>>> page once
>>>> completed?. If so then you could increment a counter variable
>>>> when the
>>>> record matches your criteria ( $counter++; ) and then echo this
>>>> out before
>>>> you echo out your content from the loop.
>>>>
>>>> Andy Gaunt
>>>> Office: 321.206.3658
>>>> Mobile: 407.810.4722
>>>> andy at fmpug.com
>>>> http://www.fmpug.com
>>>
>>> --
>>>
>>> Jonathan Schwartz
>>> FileMaker 8 Certified Developer
>>> Associate Member, FileMaker Solutions Alliance
>>> Schwartz & Company
>>> jonathan at eschwartz.com
>>> http://www.eschwartz.com
>>> http://www.exit445.com
>>> 415-381-1852
>>>
>>> _______________________________________________
>>> 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
>
>
> --
>
> Jonathan Schwartz
> FileMaker 8 Certified Developer
> Associate Member, FileMaker Solutions Alliance
> Schwartz & Company
> jonathan at eschwartz.com
> http://www.eschwartz.com
> http://www.exit445.com
> 415-381-1852
>
> _______________________________________________
> 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