I'm looking for a way to convert a numeric into a string that could be used to represent a version.
Let's say we have
$foo = 123
I'd like to be able to convert this into $foo = "1.2.3"
So far I've tried
$foo = 123;
$string = preg_replace("[^0-9]",'$0\.',$foo);
But that doesn't seem do do anything at all, $string
just comes back as empty/null.
What am I doing wrong?