@ryan.murray
There are several ways to remove quotes in PHP, depending on what you are trying to achieve:
1 2 3 |
$string = '"Hello World"'; $withoutQuotes = str_replace('"', '', $string); echo $withoutQuotes; // Output: Hello World |
1 2 3 4 5 |
$array = ['"Hello"', '"World"']; $withoutQuotes = array_map(function ($item) { return str_replace('"', '', $item); }, $array); print_r($withoutQuotes); // Output: Array ( [0] => Hello [1] => World ) |
1 2 3 |
$string = ''Hello World''; $withoutQuotes = eval("return $string;"); echo $withoutQuotes; // Output: Hello World |
Note: It's important to understand the context and purpose of removing quotes, as it may not always be necessary or appropriate to do so.