I have made this loop with PHP OOP:
for($i=1;$i<=5;$i++){
echo "
<tr>
<td>$i</td>
<td>".$menuSet->GetMenuLink1()."</td>
<td>
<a title='Edit' href='#'><span class='glyphicon glyphicon-pencil'></span></a>
<a title='Remove' href='#'><span class='glyphicon glyphicon-remove'></span></a>
</td>
</tr>
";
// replace $menuSet->GetMenuLink1() with another variable
}
And as you can see I want to replace $menuSet->GetMenuLink1() variable with $menuSet->GetMenuLink2() and this loop goes till $menuSet->GetMenuLink5().
(Add 1 to GetMenuLink function)
So how can I do this in php ?
i=1,2,3,4,5.... canging variable names and having same type of multiple function with integer included name is really bad practice