Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3339 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

In normal PHP, you would do something like this:

<?php
$arr 
= array("one""two""three");

$c = 1;
foreach ($arr as $value) {
    echo $c.
") ".$value."<br />\n";
    $c++;
}

?>

Does this help?

Posted

If you need to set a "value" for each row returned (sort of like the @@ in FileMaker layout mode), based on the sorted results, of course:

I couldn't find any method that does this, but may be a differnt method.

 

Before loop, set $varCount to 0

$varCount = 0;

 

Then in each for-each loop (within table cell if needed) to output other found results:

 

$varCount = $varCount + 1;

echo $varCount;

 

There may be a return value for the Row Num or such in the XML results, I just don't know at the moment. If there is, than you can use that value. the xml value for the element resultset attribute 'count' of course would give you how many records/rows are returned.

 

  • Like 1
Posted

Beverly,

Does not 

$varCount++;

increment that value by one? Curious... It does in raw PHP.

Posted

yes, of course ++ is standard PHP for increment 1 and would also work. thanks, DW!

beverly

This topic is 3339 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.