title: how to remove unwanted characters from string in PHP
body: <p>When i read an array i got value set like this <code>"lat" : -37.8087928,</code>. I want to only <code>-37.8087928</code> part. what is the correct way to do that. </p>
  
  <p>I did it in this way:</p>
  
  <pre><code>$value = '"lat" : -37.8087928,';
  $ex = explode(':', $value);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>$ex2 = explode(',', $ex[1]);
  </code></pre>
  
  <p>final <code>resualt $ex2[0]</code></p>
  
  <p>is this correct or what is the correct way, thank you all</p>