Php escaping single quote operator

Text and code can be written in quotes in php. One of these quotes that we use when turning a variable on and off is put when starting and one ending. Using another quotation mark in the text commands the code to end unintentionally. To avoid being affected by this, it is the \ sign, which is the escaping quotes operator. If we use this operator before the apostrophe, the 'operator after that will be ineffective.
Correct usage

echo $word= 'The best car to buy\'s from Italy';


Wrong use

echo $word= 'The best car to buy's from Italy';

0 Yorum

Soru & Yorum


Web Tasarım

Renkli Kare

Web Tasarım Ajansı