quick [php function] -> [javascript function] question
- by Haroldo
if anyone fancies doing me a really quick favour, it would be really appreciated:
static function make_url_safe($z){
$z = strtolower($z);
$z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z);
$z = str_ireplace(' ', '-', $z);
return $z;
}
what js functions should i be looking at to convert this function to javascript?