0
我試圖將我的變量綁定到一個數組中。目前,我有他們在他們自己的陣列。我需要做些什麼來將它們綁定到一個數組中?PHP準備語句將多個變量綁定到一個數組
$catSelect = $db->prepare("SELECT... WHERE jos_categories.alias = ?");
$catSelect->bind_param('s', $category);
$catSelect->execute();
$catSelect->bind_result($contentAlias, $contentCatID, $contentTitle, $contentID);
$contentAliasArray = array();
$contentCatIDArray = array();
$contentTitleArray = array();
$contentIDArrray = array();
while ($catSelect->fetch()) {
$contentAliasArray[]=$contentAlias;
$contentCatIDArray[] = $contentCatID;
$contentTitleArray[] = $contentTitle;
$contentIDArrray[] = $contentID;
}
$catSelect->close();