Convert MySQL's POINT to text in PHP
<p>Using PHP, how can I convert a value in <code>POINT</code> datatype to a string like <code>POINT (-34.601020 -58.371020)</code> (an ouput in WKT or GeoJSON is preferable)</p>

<p>If I echo the raw value, I get weird characters.</p>

<p>I've tried using <code>bin2hex</code> and then tried to convert the hex to string but with no luck.</p>

<p>I'm aware of MySQL's <code>AsText()</code>, but I would like to do it in PHP.</p>