I have a two dimensional array in PHP that prints the index of the array instead of the value.
Here's where I set up the array.
for($i = 1;$i <= $numOfCriteria;$i++)
{
for($j = 1;$j <= $numOfScores;$j++)
{
$description[$i][$j] = mysql_real_escape_string($_POST['descriptionPosition'.$i.$j]);
}
}
Here's the SQL query.
for($i = 1;$i <= $numOfCriteria;$i++)
{
for($j = 1;$j <= $numOfScores;$j++)
{
$this->Instructor->query("INSERT INTO Criteria_Description (description,CriteriaID,ScoreID) VALUES (\"$description[$i][$j]\",\"$criteriaID[$i]\", \"$scoreID[$j]\")");
}
}
This is what it puts in the database.
Array[1]
Array[2]
Array[1]
Array[2]
Thanks for any replies in advance.