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?
- How to prevent the “Confirm Form Resubmission” dialog?
- navigate back with PHP form submission
- How do I make a redirect in PHP?
- List of All Locales and Their Short Codes?
- What do ++ and *+ mean?
- Regex not operator
- How to fix “Headers already sent” error in PHP
- node.js string.replace doesn’t work?
- Whoops, looks like something went wrong. Laravel 5.0
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP
- http://localhost:80 is not working on running Apache server through UniServer ZeroXIII
- Split string on whitespace in Python
- How do I get PHP errors to display?
- Get the full URL in PHP
- How to force file download with PHP
- How to Set Category Page as Home Page in Prestashop
- Python string.replace regular expression
- How can I find my php.ini on wordpress?
- PHP + curl, HTTP POST sample code?
- What does regular expression \\s*,\\s* do?
- How to call a JavaScript function from PHP?
- Error 500: Premature end of script headers
- Cookies vs. sessions
- PDO with INSERT INTO through prepared statements
- How to get the file extension in PHP?
- Are there dictionaries in php?
- Multiple file upload in php
- When should I use ‘self’ over ‘$this’?
- php create object without class
- Creating a search form in PHP to search a database?
- How do I make a simple crawler in PHP?
- Create PDF file using PHP
- pdo – Call to a member function prepare() on a non-object
- Sort array of objects by object fields
- Compare given date with today
- When to generate a new Application Key in Laravel?
- “Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP
- Call to undefined method mysqli_stmt::get_result
- Count how many files in directory PHP
- What does it mean to escape a string?
- Creating default object from empty value in PHP?
- Send attachments with PHP Mail()?
- Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by all
- Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
- Convert DateTime to String PHP
- Xampp Access Forbidden php
- File attachment with PHPMailer
- Warning: mysqli_query() expects parameter 1 to be mysqli, resource given
- Fatal error: Call to undefined function money_format()
- Laravel 5 MethodNotAllowedHttpException in RouteCollection.php line 201:
- PHP “&” operator
- XAMPP, using port:81, cannot run localhost:81/mywebsite
- Lua String replace
- How to integrate WordPress with Angular 8 for website?
- Fatal error: Maximum execution time of 30 seconds exceeded
- cURL request in Laravel
- PHP array printing using a loop
- Standard function to replace character or substring in a char array?
- How to send to BCC address when using PHPMailer to format MIME message for Gmail API?
- Call a REST API in PHP
- Is there any way to test PHP locally without installing a server?
- PHP Redirect with POST data
- Getting the screen resolution using PHP
- PHP: fopen() Permission denied
- How should I be setting browscap.ini file
- CodeIgniter: Unable to connect to your database server using the provided settings Error Message
- Returning JSON from a PHP Script
- Can I store images in MySQL
- MySQL Daemon Failed to Start – centos 6
- How to remove index.php from WordPress site URL
- Remove warning messages in PHP
- How to generate .json file with PHP?
- Call to a member function on a non-object [duplicate]
- Generate PDF from HTML PHP
- Call to a member function fetch_assoc() on boolean in
[duplicate] - How to use Memcached with PHP7?
- select count(*) from table of mysql in php
- Auto increment in phpmyadmin
- Correct regex for wp_embed_register_handler
- How to add no follow to specific links?