or, I think, mod might be able to do it.
But don't quote me on that.
(, Wed 17 Jun 2009, 17:51, archived)
Plus if the string is an even number of numbers - problem.
(, Wed 17 Jun 2009, 17:55, archived)
if it were coding, it'd be peasy..
echo $num[floor(strlen($num)/2)];
(, Wed 17 Jun 2009, 18:02, archived)
c0 × 100 + c1 × 101 + c2 × 102 + ... + cn × 10n (more typically written as cn...c2c1c0; e.g. 439 is 4 × 102 + 3 × 101 + 9 × 100.)
you should first find n, divide it by two, and you've got the power of 10 the middle digit multiplies. From there, it gets a little complicated.
(, Wed 17 Jun 2009, 18:16, archived)