Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function changeNumbers($str,$mode='en',$mf='٫'){
- $latin=array('0','1','2','3','4','5','6','7','8','9','.');
- $farsi=array('۰','۱','۲','۳','۴','۵','۶','۷','۸','۹',$mf);
- return($mode=='fa')?str_replace($latin,$farsi,$str):str_replace($farsi,$latin,$str);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement