Posted By

nicolaspar on 07/12/06


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

luman
vali29


Php texto a mayusculas


 / Published in: PHP
 

  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  

You need to login to post a comment.