• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to show object data in view file

#2
[eluser]CroNiX[/eluser]
Since you are only retrieving 1 row (limit 1) in your getId() method, use $row instead of $result. I'm not sure why you are looping over your results and putting them in a new array. It's already an array of objects (or array of arrays if returning data as array). Just return $query->row(); See the manual for generating query results for the explanations.

Then, in your envoyer_chaussure() method, you need to do something like:
Code:
$data['identifiant'] = $this->site_model->getId();  //the array key "identifiant" will now be $identifiant in your view
$this->load->view('details', $data);

Your view should work then.


Messages In This Thread
how to show object data in view file - by El Forum - 02-22-2012, 12:36 PM
how to show object data in view file - by El Forum - 02-22-2012, 01:29 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.