tags:

views:

63

answers:

2

i really dont understand javascript.

in php i can do like this:

$tags_array = preg_replace('/"/', '', $tags_array);

to remove quotes. how do i write it in javscript?

+2  A: 
str = str.replace(/"/g, '');
Annie
The quote doesn't needs to be escaped, `/"/g` will be enough :)
CMS
PHP's `preg_replace` accepts array of strings or a single string, so `.replace` is not a direct replacement for that.
o.k.w
+1  A: 

You can do almost the same thing with javascript what you do with php, i mean many functions, here is the solution:

PHPJS

Sarfraz