Posted By

nicolaspar on 07/12/06


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

luman
vali29
willcodeforfood


Php texto a minusculas


 / Published in: PHP
 

  1. function lower($str){
  2. #return preg_replace("/([A-Z\xC0-\xDF])/e","chr(ord('\\1')+32)",$str);
  3. $bien = "abcdefghijklmnñopqrstuvwxyzáéíóúü";
  4. $mal = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÜ";
  5. return strtr($str,"$mal","$bien");
  6. }

Report this snippet  

You need to login to post a comment.