Nodral Posted April 20, 2011 Share Posted April 20, 2011 Hi All Can anyone give me any pointers as to why I'm getting the following error from the code below? <?php require_once "../config.php"; $sql = 'SELECT value FROM `mdl_scorm_scoes_track` WHERE scormid =338 AND element = "cmi.core.lesson_status"'; $sql = mysql_query($sql); while ($row = mysql_fetch_array($sql)){ switch($row['value']{ case "passed": $passed ++; break; case "incomplete": $incomplete++; break; case "completed": $completed++; break; default: $other++; break; } } echo "Passed = $passed <br/>"; echo "Incomplete = $incomplete <br/>"; echo "Completed = $completed <br/>"; echo "Others = $other<br/>"; ?> Parse error: syntax error, unexpected T_CASE in D:\Documents\AI24\Web\skooch\dccout\index.php on line 8 Cheers in advance guys Quote Link to comment Share on other sites More sharing options...
Nodral Posted April 20, 2011 Author Share Posted April 20, 2011 All sorted, just spotted a missing bracket Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.