ERuiz Posted December 19, 2006 Share Posted December 19, 2006 Hello everyone,I have a variable which I need to trim. Let me try to explain.I have a table named "liveacars" and a field named "Position".Inside "Position", I will have a coordinate in the following format (where x is a number):Nxx xx.xxxx Wxx xx.xxxxWhat I need to do is the following:1. Put Nxx xx.xxxx and Wxx xx.xxxx into 2 separate variables.If you notice, right in the middle of this variable, there is a white space separating the 2 values. I guess we could use this middle whitespace, as the spot where we split. How can this be done?Regards,ERuiz Link to comment https://forums.phpfreaks.com/topic/31196-trimming-1-variable-into-2-separate-variables/ Share on other sites More sharing options...
michaellunsford Posted December 19, 2006 Share Posted December 19, 2006 explode() is an option.http://us2.php.net/explode Link to comment https://forums.phpfreaks.com/topic/31196-trimming-1-variable-into-2-separate-variables/#findComment-144219 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.