finding and storing values from string
<p>i have a string which looks something like this:</p>

<pre><code>$fetched = name=myName zip=420424 country=myCountry; 
// and so on, it is not an array
</code></pre>

<p>I fetch these values from an api.</p>

<p>I want only the zip=873289 (infact only the numbers).</p>

<p>So i use:</p>

<pre><code>// $fetched above is the output of the fuction below
$fetched = file_get_contents("http://example.com");
</code></pre>

<p>this way i fetch the contents and can match it with this code</p>

<pre><code>$zip = preg_match ('/zip=[0-9]+/', $fetched );
</code></pre>

<p>but i want to store it in the variable, what is function to store the matched results?</p>

<p>Thank You.</p>
