строка не найдена

as the last row in the loop to add for example Last String?


Answer 1, Authority 100%

1)

$variable = array('str1','str2','str3');
for($i=0;$i<count($variable)-1;i++){
echo $variable[$i];
}
$i++;
echo 'Last String:'.$variable[$i];//    ,     

2)

$variable = array('str1','str2','str3');
$last = array_pop($variable);
while($str = array_shift($variable))
{
  echo $str;
}
echo 'Last String:'.$last;//    ,     

Answer 2, Authority 67%

while(!_){
    echo $ ;
}
echo 'last string'.$_;

In general, it all depends on the context.


Answer 3

Do some variable increment, and then display the last line.