title: Preferred way to find values within a string - PHP
body: <p>I am getting a response back from PayPal in NPV form so I use <code>explode("&amp;",$response)</code> to separate out the return values but I fear that in the future if they mix their string up (like start it with ACK instead of TOKEN), my code will be returning the wrong value. </p>
  
  <p>My full code:</p>
  
  <pre><code>list($token,$timestamp,$correlation,$ack,$version,$build) = explode("&amp;",$response);
  </code></pre>
  
  <p>The string looks like this: <code>TOKEN=EC-3RC2692512364446&amp;TIMESTAMP=2014-02-07T00:52:51Z&amp;CORRELATIONID=e8467b1c30fb7&amp;ACK=Success&amp;VERSION=109.0&amp;BUILD=9605603</code></p>
  
  <p>Any suggestions on a better way to go about getting the values of each 'string' within this string? I was thinking <code>strstr</code> or even <code>strpos</code> but I am not certain on this. Thank you in advance for any assistance!</p>