Search the Community
Showing results for tags 'text'.
Found 1 result
Hi Larry, I hope all is well with you. I have what I thought was a simple problem with a simple solution. 😄🤣 I have in a mysql database a table with data so: 12345/98765 (they are co-ordinates). I need to subtract a number from the left number and a different number from the right number, and then put them back. Thus I need to assign the left hand number to a variable, and the right hand number to another variable. Then I can do the subtraction and replace the co-ordinates. The two numbers aren't necessarily always the same number of digits. I have thought about str_replace, ltrim, rtrim, strpos etc. but none of them cut the mustard. I'd rather do it in php that use LEFT() and RIGHT() in MySql. Any ideas? I have now wasted a whole afternoon on this. 🙄 Max