Split() deprecated
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2813241/php-split-alternative">PHP split alternative?</a>  </p>
</blockquote>



<pre><code> // Successful geocode
$geocode_pending = false;
$coordinates = $xml-&gt;Response-&gt;Placemark-&gt;Point-&gt;coordinates;
$coordinatesSplit = split(",", $coordinates);
// Format: Longitude, Latitude, Altitude
 $lat = $coordinatesSplit[1];
$lng = $coordinatesSplit[0];
</code></pre>

<p>Hello People, this is a part of my geolocation code. I try to change a stored adress into a lat/long and than save the lat/long back in the database. 
They use the split function to put a string in an array but since php 5.3.0 the function is deprecated.
Anyone has a solution for this?</p>

<p>Thank you</p>

<p>EDIT:</p>

<p>When i use this</p>

<pre><code>$coordinatesSplit = preg_split(",", $coordinates);
</code></pre>

<p>I receive following error</p>

<blockquote>
  <p>preg_split() [function.preg-split]:
  No ending delimiter</p>
</blockquote>

<p><strong>LAST edit</strong>
When i add something to the database, the long/late are automatically saved to. But when i want to add for example the 6th adress in the database, the script to generate the lat/long is automatically doing this over all the records in the database. Is there any posibility to do this only at the last added? ----> <a href="http://stackoverflow.com/questions/10543719/geolocation-long-lan-in-database">Geolocation LONG/LAN in database</a></p>
