Return to Snippet

Revision: 134
at June 30, 2006 13:42 by cochambre


Initial Code
function jsstring($string){
	$nl = "
";
	$search = array($nl,"'");
	$replace = array(' ','\'');
	return str_replace($search,$replace,$string);
}

Initial URL

                                

Initial Description

                                

Initial Title
Prepara un string en PHP para ingresarlo en codigo Javascript

Initial Tags
javascript, php, error

Initial Language
PHP