$commentid = 2; //example
echo "<input id = 'inputthing".$commentid."' value = '".$commentrow."' style = ' background-color: transparent; border: 0px solid; box-shadow: none;'>";
echo "</input>";
echo "<script>";
echo 'var commentvalue'.$commentid.' = $("#inputthing'.$commentid.'").val();';
echo "</script>";
The .val func breaks my code, what did I do wrong? (By the way it isn't a php syntax error if there was I would have seen it when running my code as the errors are displayed this is a javascript error).