Posts

Showing posts with the label string in Php

PHP String

Image
String in PHP PHP Sring A series of characters widely used to store and manipulate the text is called the PHP String. PHP supports only 256-character set and therefore does not offer support for native Unicode. There are basically two methods to show the string in PHP: Single Quoted Double Quoted Single Quoted In PHP the programmer can create a string simply by enclosing the text in a single quote(' '). In general, this method is known as the easiest way to define the string in PHP. This type of Php string processes no special characters within quotes. In order to specify a literal single-quote in PHP, you have to escape with a backslash (\) to describe a single quote literally and use a double backslash (\\) to set a literal backslash (\). Instead of having some special meaning, all other backslash instances, namely \r or \n, are generated the same as defined. Here is an example which will allow you to understand in depth the single-quote...