As comments and other answers indicate your question may not be quite explicit enough. Taking it at face value, if you just want to replace double quotes (") you should use str_replace()
str_replace('"', '\"', $string);
Related Posts:
- Array to String PHP?
- regex match any whitespace
- How do I check if a string contains a specific word?
- PHP random string generator
- Is a new line = \n OR \r\n?
- Regex to check for new line
- Mixing a PHP variable with a string literal
- Converting string to Date and DateTime
- PHP: variables in strings without concatenation
- Multi-line strings in PHP
- Remove all special characters from a string
- Uncaught Error: Call to undefined function mysql_escape_string()
- How can I capture the result of var_dump to a string?
- How to convert string to boolean php
- Check if URL has certain string with PHP
- What is the MM/DD/YYYY regular expression and how do I use it in php?
- Limit String Length
- Insert string at specified position
- Remove empty array elements
- Replace ' and similar html codes with their correspondent character?
- Google Calendar API event update always return 404 “not found” error
- How to prevent the “Confirm Form Resubmission” dialog?
- navigate back with PHP form submission
- How to set 777 permission on a particular folder? [closed]
- How do I make a redirect in PHP?
- List of All Locales and Their Short Codes?
- Difference between “as $key => $value” and “as $value” in PHP foreach
- How to replace all occurrences of a string in JavaScript
- How do I get a YouTube video thumbnail from the YouTube API?
- What is a slug?
- Visual list of all installed fonts with respective pangram phrase?
- Regex not operator
- Regex not operator
- What do ++ and *+ mean?
- How to avoid Request Entity Too Large 413 error
- How to log in to phpMyAdmin with WAMP, what is the username and password?
- How can I exclude one word with grep?
- Matching a space in regex
- Regex not operator
- Should I use mysqli_real_escape string() or mysql_real_escape_string() for form data?
- How do I check if a string contains a specific word?
- count() parameter must be an array or an object that implements countable in laravel
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- How to fix “Headers already sent” error in PHP
- node.js string.replace doesn’t work?
- How to use operator ‘-replace’ in PowerShell to replace strings of texts with special characters and replace successfully
- currently unable to handle this request HTTP ERROR 500
- PHP page redirect
- Whoops, looks like something went wrong. Laravel 5.0
- PHP “or” Syntax
- Regex how to match an optional character
- Fatal error: Call to undefined function mysql_connect()
- How to fix “Headers already sent” error in PHP
- Replace part of a string with another string
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP
- What are namespaces?
- Get the full URL in PHP
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- http://localhost:80 is not working on running Apache server through UniServer ZeroXIII
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- How to find all occurrences of a substring?
- Split string on whitespace in Python
- Mysql query- How to use contains?
- How do I get PHP errors to display?
- S_SESSION variable (user role) not recognised
- How to validate an email address in PHP
- What are the main differences between PHPExcel and PhpSpreadsheet?
- Is SAJAX dead? What to replace with?
- How do I resolve a HTTP 414 “Request URI too long” error?
- Get the full URL in PHP
- PDOException: SQLSTATE[HY000] [2002] No such file or directory
- xajax expanding list query
- JavaScript replace/regex
- How to force file download with PHP
- How do I get a file extension in PHP?
- How to Set Category Page as Home Page in Prestashop
- Get the full URL in PHP
- Data source name not found, and no default driver specified
- mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
- Invalid column count in CSV input on line 1 Error
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in
- How to copy a file from one directory to another using PHP?
- How to check if a string starts with a specified string?
- Python string.replace regular expression
- what does PHP die() return
- Invalid column count in CSV input on line 1 Error
- Remove all special characters, punctuation and spaces from string
- This can be done without regex:
- Getting an error when I visit http://localhost
- How do I redirect a page in jQuery?
- How to replace all double quotes to single quotes using jquery?
- Python string.replace regular expression
- mcrypt is deprecated, what is the alternative?
- Best way to replace multiple characters in a string?
- How can I find my php.ini on wordpress?
- How to replace ” \ ” with ” \\ ” in java
- Regex how to match an optional character
- mysqli_real_connect(): (HY000/2002): No such file or directory
- Convert a PHP object to an associative array
- XAMPP Port 80 in use by “Unable to open process” with PID 4