Skip to content
Advertisement

Tag: quotes

PHP Wrap ALL fields in quotes fputcsv()

I’m relatively new to PHP so please bear with me. my code currently looks like this: This works as expected, however, the client requires ALL fields to be wrapped in quotations, not just those containing spaces. I’ve seen a lot of solutions online but they all seem overly complicated or seem to suggest that I should edit the CSV once

How do I remove quotes from a string?

How to remove all types of quotes (different languages) from $string? Answer I assume you mean quotation marks? Otherwise, go for some regex, this will work for html quotes for example: C-style quotes: CSS-style quotes: bash-style quotes: Etc etc…

Advertisement