[FX.php List] Can you pull from array?

DC dan.cynosure at dbmscan.com
Tue Oct 17 16:18:00 MDT 2006


can you clarify whether you want the name of the field or the data  
from the field? it isn't clear from your question.
also, you have two places where it says this is a test... which one  
do youwant to replace?

dan

On Oct 17, 2006, at 5:55 PM, David Tinoco wrote:

> Hello Everyone,
>
> Is there a way to pull out certain arrays from the FX Data array?
>
> I will give an example.
>
> 1. Let's say you do a find:
>
> $popular=new FX($serverIP,$webCompanionPort);
> $popular->SetDBData('File.fp7','Popular Searches',15);
> $popular->SetDBPassword($webPW,$webUN);
> $popularResult=$popular->FMFind();
>
> Now, I want to put these 15 results into a table 3 columns wide by  
> 5 rows tall.
>
> $cells=$popularResult['foundCount'];
> $curcells=$cells;
> $rows=ceil($cells/3);
> $falsecells=$rows*3;
> $leftcells=$falsecells-$cells;
> $currows=0;
> while($currows<$rows && $cells-1>$leftcells)
> {
> echo'<td class="Bold11_Blue2">This is a test</td>';
> $curcells=$curcells-1;
> if($cells-$curcells==3)
>  {
>  echo'</tr><tr>';
>  $cells=$curcells;
>  $currows++;
>  }
> }
> If($cells>0)
> {
> for($num=0;$num<$cells;$num++)
> {
> echo'<td>This is a test</td>';
> }
> }
>
> Now I just want to replace where it says "This is a test" with a  
> field from the find. Is there something like an array that I can  
> use instead of using the foreach ($popularResult as $key => 
> $popularData['Field'][0]), with a counter using i++ or something?
>
> Thanks,
> David
>
> Express yourself - download free Windows Live Messenger themes! Get  
> it now!
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20061017/0f9de85a/attachment-0001.html


More information about the FX.php_List mailing list