admin管理员组

文章数量:1335102

I really don't understand Javascript.

In PHP, I can remove quotes like this:

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

How do I write it in Javascript?

I really don't understand Javascript.

In PHP, I can remove quotes like this:

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

How do I write it in Javascript?

Share Improve this question edited Nov 23, 2011 at 23:21 Jonathan Leffler 755k145 gold badges949 silver badges1.3k bronze badges asked Dec 22, 2009 at 6:36 ajsieajsie 79.9k110 gold badges284 silver badges386 bronze badges 1
  • Do you mean "remove quote from an array of string"? You'll have to loop through the array to do it. – o.k.w Commented Dec 22, 2009 at 6:40
Add a ment  | 

2 Answers 2

Reset to default 6
str = str.replace(/"/g, '');

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

PHPJS

本文标签: phpremove quotes from variable in javascriptStack Overflow