Encoding of HTML/XML special chars
1 2 function encode(string) { 3 return string.replace('&','&').replace('<','<').replace('>','>').replace('\'',''').replace('"','"'); 4 }
13493 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Dmitry Polushkin http://dmitry.eu/
1 2 function encode(string) { 3 return string.replace('&','&').replace('<','<').replace('>','>').replace('\'',''').replace('"','"'); 4 }
1 2 function filename_extension($filename) { 3 $pos = strrpos($filename, '.'); 4 if($pos===false) { 5 return false; 6 } else { 7 return substr($filename, $pos+1); 8 } 9 }