-1

If I use a double quote in title of my application i have a problem , then I want to create a condition :

if i have double quote , use single quote .

Thanks you very much !

krowry
  • 73
  • 7

2 Answers2

1

You haven't provided much context for your question so it's difficult to know exactly how to help, but lets say you have a variable called $title with double quotes in it, you can replace them like this:

$title = str_replace('"', "'", $title);

thewildandy
  • 318
  • 2
  • 8
0

You can use the str_replace() following :

str_replace('"', "'", $text);

str_replace

Deep Kakkar
  • 5,831
  • 4
  • 39
  • 75