Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $j=0; $l=0; $res=[];
- if (isset($_POST['submit'])) {
- $id=$_POST['text'];
- $t=rtrim($id);
- $word=explode(" ",$t);
- $count=count($word);
- for ($i = 0; $i <$count ; $i++) {
- $query=mysql_query("SELECT * FROM school WHERE roman='$word[$i]' OR roman1='$word[$i]' OR roman2='$word[$i]' LIMIT 1");
- if (mysql_num_rows($query) > 0) {
- while($r=mysql_fetch_assoc($query)) {
- $re=$re.$r['arabic'] . ' '; $res[$j]=$r['arabic'];
- }
- } else {
- $re=$re.$word[$i].' ';
- $res[$j]=mb_convert_encoding($word[$i], "UTF-8");
- }
- $j++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement