How to delete variables and detect variables in PHP

小云云
Release: 2023-03-22 10:38:01
Original
1515 people have browsed it

This article mainly shares with you the methods of deleting variables and detecting variables in PHP. I hope it can help you.

1. Delete variables:

Syntax:

unset($variable name);

2. Detect variables

Syntax: isset($variable name); detects whether the variable exists, only true and false, the browser displays 0 or 1.

When you want to display true or false, use var_dump(isset($variable name) ) to make a judgment.

var_dump() output content length, type, value, mainly used for program debugging


Related recommendations:

String equality and deletion of variables in php

The above is the detailed content of How to delete variables and detect variables in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!