Answers for "when to use double quotes and single quotes in php"

PHP
1

php single quote vs double quote

$s = "dollars";
echo 'This costs a lot of $s.'; // This costs a lot of $s.
echo "This costs a lot of $s."; // This costs a lot of dollars.
Posted by: Guest on December-22-2021
-1

how to replace double quotes in a string in php

to replace double quotes, you can do this:
$newPhrase = str_replace('"', '', $phrase);
Posted by: Guest on July-29-2021

Code answers related to "when to use double quotes and single quotes in php"

Browse Popular Code Answers by Language