I am trying to retain the radio button that was checked by the user when they return to edit posting. I am having difficulty in the proper syntax to get this to work.
Prior to adding the if statement everything worked fine.
for($index=0; $index < $indexCount; $index++)
{
if (substr("$dirArray[$index]", 0, 1) != ".")
{
echo"<div class=\"imageselect\"><br><div class=\"imageselectholder\"><img src =\"server/php/files/".$me."/medium/" . $dirArray[$index] ." \" /><br></div><div class=\"imageselecttxt\">Check to use this image</div><div class=\"imageselectcheck\"><input type=\"radio\" name=\"fpi\" value=\"" . $dirArray[$index] ."\" .if($_SESSION['fpi'] == $dirArray[$index]) \"checked=\"checked\" \"/></div> </div>";
}}
?>