CodeIgniter Forums

Full Version: Very simple DataMapper issue just installed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Datamapper latest version first orm i have been having a play for some reason i cannot get a foreach to in a view but it works in the controller. I have pasted a crude example any ideas?

public function index()

  $c = new Make();
                $data['cars'] = $c->get();

View sample

<?php echo $cars->Make; ?> //this works
// below this does not work
foreach ($cars as $ma) {