Php texto a mayusculas


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function upper($str){
  2. # return preg_replace("/([a-z\xE0-\xFF])/e","chr(ord('\\1')-32)",$str);
  3. $mal = "abcdefghijklmnñopqrstuvwxyzáéíóúü";
  4. $bien = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÜ";
  5. return strtr($str,"$mal","$bien");
  6.  
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.