title: Using json_encode on php $_GET array results in string rather than array of strings
body: <p>I'm trying to use the php GET method to create an array of keywords from a keywordBox field on another page.</p>
  
  <p>Here is an example of the keywords appended to the page URL:</p>
  
  <p>/searchResults.php?keywordBox=computing+finance</p>
  
  <p>This looks okay to me but when I convert to a JSON object it seems the keywords become a single string ("computing finance") rather than array of strings (["computing", "finance"])</p>
  
  <pre><code>var keywords = &lt;?php echo json_encode($_GET['keywordBox']) ?&gt;;
  alert(keywords[0]);  // output "c"
  </code></pre>
  
  <p>I thought this would output the first word in the array "computing" instead it outputs the first character "c"  so I'm a little confused and new to these languages. Any explanation greatly appreciated.</p>