extracting just a piece out of a 13digit number
Posted 10 October 2006 - 03:30 PM
The number looks as follow 1234567890123 now I only whant it to show nuber 56.
How can I do this? Can any one pls help me!
What I tryed were
$num = $row['num'];
$nu = ereg_replace("problem","",$num);
Okay I'm sure there's a beter way of doing it, But thats how far my brain can think.
Posted 10 October 2006 - 03:34 PM
The 13digit numer always change! But just need position 5 and 6's numbers
Posted 10 October 2006 - 03:55 PM
But working now.
Posted 10 October 2006 - 04:01 PM
Another way of doing it would be:
<?php $num = '1234567890123'; $num56 = substr($num,5,2); echo $num56; ?>
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users