I have foreach
and it has the same results, I want it when it has the same result it makes a echo
Code sample:
$courses = array('teste', 'teste2', 'teste3', 'teste');
foreach ($courses as $key => $course) {
if ($course == $course) {
echo $course;
}
}
The second comparison variable is missing in the example, in the example I used the same $course->fullname
in the 2 places of if
EDIT: I need if if I identify the two 'test' values and give a echo