Hey all... When I run the code below, the if(property_exists(get_class($puzzleCharacters_encrypted), $solutionCharacter) keeps evaluating to false, but the echo statements preceding that are showing the correct information, so the properties are definitely there. Anything I might be missing? (PHP Version 5.2.11)
$puzzle_solution = $currentPuzzleData->getVal("text");
$puzzle_encryption = "";
for ($i = 0; $i < strlen($puzzle_solution); $i++)
{
$solutionCharacter = substr($puzzle_solution, $i, 1);
echo ("\$solutionCharacter = " . $solutionCharacter . "<br />\n");
echo ("\$puzzleCharacters_encrypted->getVal(" . $solutionCharacter . ") = " . $puzzleCharacters_encrypted->getVal($solutionCharacter) . "<br />\n");
if (property_exists(get_class($puzzleCharacters_encrypted), $solutionCharacter))
{
$encryptionCharacter = $puzzleCharacters_encrypted->getVal($solutionCharacter);
$puzzle_encryption .= $encryptionCharacter;
}
else
{
$puzzle_encryption .= $solutionCharacter;
}
}
echo ("<br />\n" . $puzzle_solution);
echo ("<br />\n" . $puzzle_encryption);
Thanks!