2013-12-19 60 views

回答

0

像这样的事情

<?php 
$b='12.2134123N'; 
echo substr($b,strlen($b)-1,1); // N 

Source

+1

其正常工作。 –

0

您可以使用substr

$b="12.2134123N" 
echo substr($b, -1); 
0

,您可以在爆炸为:

$b="12.2134123N"; 
$new_string = explode('3',$b); 
echo $new_string[2]; 


// output N 
相关问题