title: How do I use environment variables (repl.it) to create an array?
body: <p>If you're not aware of this, environment variables are kind of like secret values in Repl.it as Repl.it makes your code publicly available for everybody.</p>
  <p>I have a set of <em>keys</em> that I want to remain hidden on the website, and I want the website to randomize a key selection to distribute to the user on page load. Kind of a makeshift key system.</p>
  <p>However, once I put the key values into the environment variable, and I try to load it into an array, this happens: <a href="https://i.imgur.com/sNFsdb6.png" rel="nofollow noreferrer">https://i.imgur.com/sNFsdb6.png</a></p>
  <p>This, in basis, is the code I'm using (I load the varaible $trollitem for display later on in the code, but that's just a bunch of HTML design)</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
    $loadstring = getenv('cheatxkeys');
    $items = array($loadstring);
    $trollitem = $items[array_rand($items)];
  ?&gt;
  </code></pre>
  <p>And finally, this is how my environment variable looks: <a href="https://i.imgur.com/qaCZxOU.png" rel="nofollow noreferrer">https://i.imgur.com/qaCZxOU.png</a></p>
  <p>For obvious reasons, these are not the actual key codes I'm using, but rather a randomly generated amount of key codes to show what I'm trying to do.</p>
  <p>If my post is unclear, please just comment, I really want to get this to work properly. Thanks!</p>