Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $j=0; $l=0; $res=[];
  2. if (isset($_POST['submit'])) {
  3. $id=$_POST['text'];
  4. $t=rtrim($id);
  5. $word=explode(" ",$t);
  6. $count=count($word);
  7. for ($i = 0; $i <$count ; $i++) {
  8. $query=mysql_query("SELECT * FROM school WHERE roman='$word[$i]' OR roman1='$word[$i]' OR roman2='$word[$i]' LIMIT 1");
  9. if (mysql_num_rows($query) > 0) {
  10. while($r=mysql_fetch_assoc($query)) {
  11. $re=$re.$r['arabic'] . '&nbsp;'; $res[$j]=$r['arabic'];
  12. }
  13. } else {
  14. $re=$re.$word[$i].'&nbsp;';
  15. $res[$j]=mb_convert_encoding($word[$i], "UTF-8");
  16. }
  17. $j++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement