title: Creating an array from a string separated by spaces
body: <p>I have an input where a user may type in multiple words, and they are told to separate it with a space. So input may look like this:</p>
  
  <pre><code>foo
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>foo bar php js
  </code></pre>
  
  <p>How can I check for spaces, and if there are spaces, split the words, then put it all into an array? I'll loop through that array in my program. I'm just new to string handling like this.</p>