<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Galactum</title>
    <description>The latest articles on Forem by Galactum (@galactum).</description>
    <link>https://forem.com/galactum</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F413659%2F03b55992-9de0-4bac-9440-2b39c796e2e6.png</url>
      <title>Forem: Galactum</title>
      <link>https://forem.com/galactum</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/galactum"/>
    <language>en</language>
    <item>
      <title>Uncaught SyntaxError: Unexpected token &lt; in a script tag</title>
      <dc:creator>Galactum</dc:creator>
      <pubDate>Sun, 21 Jun 2020 11:38:35 +0000</pubDate>
      <link>https://forem.com/galactum/uncaught-syntaxerror-unexpected-token-in-a-script-tag-4a6k</link>
      <guid>https://forem.com/galactum/uncaught-syntaxerror-unexpected-token-in-a-script-tag-4a6k</guid>
      <description>&lt;p&gt;So I have a PHP file which contains some JS code and I'm trying to pass an array from PHP into JS&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
include('autocomplete.js');
?&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
// any valid JS code can reproduce this issue because the syntax error is on the line above
var people = &amp;lt;?php echo json_encode($people)?&amp;gt;
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I get an "unexpected token '&amp;lt;'" error and the line referenced is always the one with the script tag in it&lt;br&gt;
Not really sure what to try so if anyone can help out that would be great&lt;br&gt;
Thank you &lt;/p&gt;

</description>
      <category>help</category>
      <category>php</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
