Answers for "Cannot use a scalar value as an array"

1

Cannot use a scalar value as an array

You need to set$final[$id] to an array before adding elements to it. 
Intiialize it with either

$final[$id] = array();
$final[$id][0] = 3;
$final[$id]['link'] = "/".$row['permalink'];
$final[$id]['title'] = $row['title'];
Posted by: Guest on July-09-2021

Code answers related to "Cannot use a scalar value as an array"

Browse Popular Code Answers by Language