Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should open the page in the browser, get the error, and do View Source to see what actually went to the browser.</p> <p>The likely culprit is this line:</p> <pre><code>var courseinfo = &lt;?php echo json_encode($courseInfo); ?&gt; ; </code></pre> <p>Three possibilities:</p> <ol> <li><p><s>I'm not a PHP expert, is <code>&lt;? php</code> (with the space after <code>?</code>) really a valid opening tag (as opposed to <code>&lt;?php</code> <strong>without</strong> the space)? Because if it isn't, it could be that PHP isn't processing it, and so that text is getting sent to the browser verbatim. Which naturally would be a problem.</s> You claim the space isn't really there.</p></li> <li><p><s>If that isn't it, I suspect that <code>$courseInfo</code> in PHP isn't what you expect it to be, and so isn't getting output correctly.</s> You've now quoted what gets output, which is a valid array literal.</p></li> <li><p><s>If the text you quoted isn't in a file that PHP will pre-process, that would be a problem, as the code will get sent to the browser. Normally, web servers are configured to use PHP to pre-process <code>.php</code> files, but not <code>.js</code> files. So if the text you've quoted is in a <code>.js</code> file, it will go to the browser as-is (with the PHP code in it), which probably isn't want you want.</s> I'm guessing that as you've quoted the output as having been processed, it must be getting pre-processed.</p></li> <li><p>My final thought is that you have an invisible character in your text near the <code>else</code> in question. Try deleting that entire line (probably the couple of lines on either side, just in case) and retyping them (carefully).</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload