Hello, i'm trying to create a simple converter application using php. The main function i use is strtr() that can translate from $string via arrays.
Because the arrays need to add in the file php, so it is difficult to user add their own word in this application. I was create a database that contain 2 fields. The question is how the script to write.
[PHP]
$phonArray=array(
'abaian'=>'اباين','abbas'=>'عباس','abd'=>'عبد','ab dal'=>'ابدال','abdas'=>'ابدس','abdi'=>'عبدي',);
$input="Some Texts Here....";//from form
//How to make this $input read from the database first and then proceed to next function strtr() bellow.
$output= strtr($input, $phonArray);
echo"$output";
[/PHP]