A Codeigniter library to work with Persian characters ahd normalize data entries
Copy Persian.php
to application/libraries
of your own project.
First, load library:
$this->load->library('persian');
and use one of functions:
$this->persian->text($text);
-
$this->persian->numbers_ar($num)
convert Arabic numbers to Persian numbers -
$this->persian->numbers_en($num)
convert English numbers to Persian numbers -
$this->persian->numbers_to_eng($num)
convert Persian and Arabic numbers to English numbers -
$this->persian->numbers($num)
convert English and Arabic numbers to Persian numbers -
$this->persian->text($text)
convert Arabic characters to Persian characters -
$this->persian->standard($string)
convert Arabic characters to Persian characters and convert Persian and Arabic numbers to English numbers - best way to store data -
$this->persian->allpersian($string)
convert Arabic characters to Persian characters and convert numbers to Persian numbers - best way to show data ti users
- Mahdi Majidzadeh (github)