Home >Backend Development >PHP Problem >What is the meaning of $ symbol in php

What is the meaning of $ symbol in php

王林
王林Original
2020-11-06 09:51:465448browse

The meaning of the $ symbol in php is a variable or object name identifier. If a string is followed by the $ symbol, it represents a variable name or object name. For example [$txt = "hello world"] means that the variable txt stores the value hello world.

What is the meaning of $ symbol in php

The $ symbol in php is a variable or object name identifier. If a string is followed by the $ symbol, it represents a variable name or object name. .

(Video tutorial recommendation: php video tutorial)

Example:

<?php
$txt="Hello world!";
$x=5;
$y=10.5;
?>

During the execution of the above statement, the variable txt will be saved The value Hello world!, and the variable x will hold the value 5.

Related recommendations: php training

The above is the detailed content of What is the meaning of $ symbol in php. 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