How can I add to an array without creating a nested array?
Here is my loop currently:
Code: Select all
for($x=0; $x<count($questionSelect); $x++)
{
$questionRow=mysql_fetch_array(getQuestion($companyId, $questionSelect[$x]));
$_SESSION['selectedStageQuestionsText'][]=array($questionSelect[$x]=>$questionRow['strQuestionText']);
}
I basically want to get rid of the "holding array" Array([0]=>...) how can i add to the array without having to create as a nested array?
Thanks.