i getting array value the below code
$userdays_template=$this->templateroutinemodel->get_AllDays_by_templateRoutine_id($rid);
And i printed( echo("---userdays_template--.var_dump($userdays_template));) it and
it gave me output like: array(4) { [0]=> string(3) "965" [1]=> string(3) "964" [2]=> string(3) "959" [3]=> string(3) "958" }
So my question is ,how can i get each value from this array in a loop?...
What i tried:
$userdays_template=$this->templateroutinemodel->get_AllDays_by_templateRoutine_id($rid);
echo("---userdays_template---------".var_dump($userdays_template));
if (is_array($userdays_template))
{
foreach ($userdays_template as $row)
{
$day_value= $row->day_id;;
echo("---day---------".$day_value);//not printing the this line,why?
}
}
but its not printing this echo(echo("---day---------".$day_value);). please help me
$day_value = $row;