Pull data from grid - search function

I need to run a search in a grid, then have a button to launch a blank page with code to output that searched data to the screen. I know about assigning variables in a blank page and displaying them one at a time; how can I access the data that was returned with the search? A for loop would be lovely, I just don’t know what to target to get that particular data returned. For example, I would like to

for ( $i = 1; $i < count(searchArray); $i++ ) {
    echo [variable1];
    echo [variable2];
    echo [variable3];
    echo [variable4];

Something along these lines would be perfect for this project I am working on. Thanks!


Look at Grid / Buttons => new Button, Type “Run”. And maybe this tutorial: http://www.scriptcase.net/scriptcase-samples/tutoriais/grid/grid44.php

That article was the ticket. Thanks for the help!