I am getting an unexpected T_variable on line 445 but I can’t see where the problem is, can anyone see where the problem is which is causing this error?
//start:procedure
$img_result = '';
if(empty($arrImageFile[$key])){
$img_result = ' ';
}else{
$img_$result .= '<ul class="qandaul"><li>'; //line 445
if(is_array( $arrImageFile[$key] )){
foreach($arrImageFile[$key] as $filename){
$img_$result.= CreateLink($filename, "image");
}
}else{
$img_$result.= CreateLink($arrImageFile[$key], "image");
}
$img_result.= '</li></ul>';
}
//end:procedure
echo '<td width="11%" class="imagetd">'.$img_result.'</td>' . PHP_EOL;
$img_$resultshould be:$img_resultand that should be fixed on line 448 and 451 aswell.Remember that
T_VARIABLEusually refers to the$variable symbol.If you want to use the variable of variable feature you should use
$$img_resultor${$img_result}for better understanding.