title: how to get everything before and after a certain word in string
body: <p>how do I get everything in a php string before and after a certain word? For example, if I have a string that says "5 times 8", how do I extract the 5 and the 8 and store them into separate variables? I'm kinda new to PHP.</p>
  
  <p>I've tried</p>
  
  <pre><code>$foo = "5 times 8";
  $foo = str_replace(" times ","",$foo);
  </code></pre>
  
  <p>Then what? The result is "58"</p>