Skip to content

Instantly share code, notes, and snippets.

@mmhan
Last active December 14, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmhan/5127558 to your computer and use it in GitHub Desktop.
Save mmhan/5127558 to your computer and use it in GitHub Desktop.
<?php
// Let's say $result is the data that you want to show with pagination.
//First get all the NRs of the result
$nr = Set::extract("{n}.AF.NR", $data);
//Then get the names of all the companies for the given NR
$companies = $this->FIRMA->find('list', array('conditions' => array("NR" => $nr) ) );
?>
<!-- IN YOUR VIEW FILE to echo company name -->
<?php echo $companies[$NR] ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment