My string of numbers are not replacing correctly.
I am expecting the output after replacing to be 9876543210 but it doesnt seem to be the case.
What am i doing wrong?
<?php $numbers = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); $code = array('9', '8', '7', '6', '5', '4', '3', '2', '1', '0'); $pre = '0123456789'; echo $pre . " ==> " . str_replace($numbers, $code, $pre); ?>
strrev()?0123443210