function news5($newsarray) {
$str = '';
foreach($newsarray as $value) {
$str.= '<h3>$value['title']</h3>';}
return $str;
}
echo news5($newsarray);
$newsarray is a two - dimensional array, i want to display first value of every subarray in h3 but it doesnt work, without h3 tag everything is fine, but i want it in h3. pls help!
It says "Parse error: syntax error, unexpected 'title' (T_STRING) in C:\xampp\htdocs ews ews.php on line 7"