$universe = $_SESSION["company"];
$sql = "SELECT manufacturer FROM spaceships WHERE `$universe` = 1";
$companyListQuery = $db->prepare($sql);
$companyListQuery->execute();
$companyList = $companyListQuery->fetchAll();
$companyList = array_unique($companyList);
foreach($companyList as $row){
$selected = $row["manufacturer"];
echo '<tr>';
echo '<td class="table">'.$row["manufacturer"].'</td>';
}
So this is giving me a notice saying there is an array to string conversion. But as far as I'm aware fetchAll() returns an array so I'm not sure why it's saying this? Help is appreciated.