I have the following code:
$new_model = new Model; $check_valid = $new_model->check_invalid_lineup($team_selection);
echo $check_valid fails to work.
I have checked, it is a valid function, with in my Model class, and I have set it to simply return the input parameter. So it looks like this:
public function check_invalid_lineup($teamid) { return $teamid; }
The variable $team_selection, is gained from another method in the Model class, instantiated by:
$new_model = new Model; $user_info_select = $new_model->user_info(); $team_selection = $user_info_select['team'];
I am stumped as to why I can echo $team_selection with no problem, yet when I insert it as a parameter in the function, check_invalid_lineup() it fails to work!
Have been puzzling over this for a good few days, shifting code and having no success. Any ideas?