Home >Backend Development >PHP Problem >How to convert php numbers to strings

How to convert php numbers to strings

藏色散人
藏色散人Original
2020-10-29 09:13:316803browse

How to convert php numbers into strings: First create a php sample file; then declare the file type and encoding for PHP to interact with the browser; then define a floating point deformation variable "$a=123"; finally Just convert the number into a string through the "$b=$a.'hello'" method.

How to convert php numbers to strings

Recommended: "PHP Video Tutorial"

1. First, you need to create a new 74.php.

How to convert php numbers to strings

#2. Then you need to enter the structure of the php web page according to the code shown ().

How to convert php numbers to strings

#3. Then you need to declare the file type and encoding for PHP to interact with the browser according to the code shown in the figure.

How to convert php numbers to strings

#4. Then you need to define a floating point deformation variable $a = 123 according to the code shown in the figure.

How to convert php numbers to strings

#5. Then you need to enter the code $b = $a . 'hello' according to the code shown in the figure to convert the number of $a into a string.

How to convert php numbers to strings

#6. Then you need to use the var_dump() function according to the code shown in the figure to output $b.

How to convert php numbers to strings

#7. Run the web page and check that the variable type has successfully converted the number into a string.

The above is the detailed content of How to convert php numbers to strings. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to hide ip in phpNext article:How to hide ip in php