October 1, 201510 yr Hi, when a search returns a listing, I'd like a numbered sequence like: 1 2 3 4 any example of how to do this? I appreciate your help!
October 1, 201510 yr 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?
October 1, 201510 yr 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.
October 1, 201510 yr Beverly,Does not $varCount++;increment that value by one? Curious... It does in raw PHP.
October 1, 201510 yr yes, of course ++ is standard PHP for increment 1 and would also work. thanks, DW! beverly
Create an account or sign in to comment