<?php
$accuplacer_assoc = [
array(
"Reading Comprehension" => "70",
"Branching Profile" => "Reading Comprehension - Post Test"
),
array(
"Elementary Algebra" => "83",
"Branching Profile" => "Math - Post Test"
),
];
foreach ($accuplacer_assoc as $index)
{
if (!empty($accuplacer_assoc[$index]['Branching Profile']))
{
var_dump("checking to see if accuplacer_assoc[index][i] is empty: " . !empty($accuplacer_assoc[$index][$i]) . "<br
/><br />");
break;
}
else
{
if (preg_match("/Reading Comprehension - Post Test/i", $BRANCHING_PROFILE) === 1)
{
$code='PA2';
}
else if (preg_match("/^Sentence Skills - Post Test$/i", $BRANCHING_PROFILE) === 1)
{
$code='PA1';
}
else if (preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1 )
{
$code='PA5';
}
else if (preg_match("/^Elementary Algebra - Post Test$/i", $BRANCHING_PROFILE) === 1)
{
$code='PA6';
}
else if (preg_match("/^College Level Math - Post Test$/i", $BRANCHING_PROFILE) === 1)
{
$code='PA7';
}
else if (preg_match("/^Reading Comprehension$/i" , $BRANCHING_PROFILE ) === 1)
{
$code='AC2';
}
else if (preg_match("/^Sentence Skills$/i" ,$BRANCHING_PROFILE) === 1)
{
$code='AC1';
}
else if (preg_match("/^Arithmetic$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC5';
}
else if (preg_match("/^Elementary Algebra$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC6';
}
else if (preg_match("/^College Level Math$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC7';
}
}
if (preg_match("/Reading Comprehension - Post Test/i", $BRANCHING_PROFILE) === 1)
{
$code='PA2';
}
else if (preg_match("/^Sentence Skills - Post Test$/i", $BRANCHING_PROFILE) === 1)
{
$code='PA1';
}
else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^Arithmetic/i", $accuplacer_assoc[$index]['Arithmetic']) === 1))
{
$code='PA5';
}
else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^Elementary Algebra/i", $accuplacer_assoc[$index]['Elementary Algebra']) === 1))
{
$code='PA6';
}
else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^College Level Math/i", $accuplacer_assoc[$index]['College Level Math']) === 1))
{
$code='PA7';
}
else if (preg_match("/^Reading Comprehension$/i" , $BRANCHING_PROFILE ) === 1)
{
$code='AC2';
}
else if (preg_match("/^Sentence Skills$/i" ,$BRANCHING_PROFILE) === 1)
{
$code='AC1';
}
else if (preg_match("/^Arithmetic$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC5';
}
else if (preg_match("/^Elementary Algebra$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC6';
}
else if (preg_match("/^College Level Math$/i", $BRANCHING_PROFILE) === 1)
{
$code='AC7';
}
}
preferences:
48.68 ms | 402 KiB | 5 Q