02-20-2012, 08:39 PM
[eluser]snowstar[/eluser]
Hi All
Im trying find a better way to do this
My Controller:
Basically im looping through assigning a value from the database to a variable. Then im checking to see if the variable matches. This technically works how-ever its not dynamic (the band member amount will change each time)
Can any one recommend a better way of doing this? im out of ideas
Hi All
Im trying find a better way to do this
My Controller:
Code:
function printview($uniqueid)
{
$members = $this->entry_model->get_members_forprintview($uniqueid);
$data['members'] = $members;
for($i = 0; $i < count($members); $i++){
$member[$i] = $members[$i]['school'];
}
if (($member[0] == $member[1]) && ($member[1] == $member[2]) && ($member[2] == $member[3])) {
echo 'They are all the same';
}
$this->load->view('print_view', $data);
}
Basically im looping through assigning a value from the database to a variable. Then im checking to see if the variable matches. This technically works how-ever its not dynamic (the band member amount will change each time)
Can any one recommend a better way of doing this? im out of ideas