I'm trying to extract and make variables out of the "thinking skills" (like analyzing, evaluating, etc.) from a test and set their value to the number of test items within each. I'm stuck, so any help would be appreciated. (The SQL statement seems to work fine.)
Example of what I want: $analyzing = 7, $applying = 13, etc.... Thanks!
$sql = "SELECT thinkskill AS tskill
, COUNT(thinkskill) AS counttskill
FROM $c_keytable
GROUP BY thinkskill
ORDER BY thinkskill" ;
$result = mysql_query ( $sql ) ;
while ( $row = mysql_fetch_assoc ( $result ) )
{
// Example: $analyzing = 7 -->
${$row["tskill"]} = $row["counttskill"] ;
}