PHP unset()ฟังก์ชั่น
❮ ข้อมูลอ้างอิงการจัดการตัวแปร PHP
ตัวอย่าง
ยกเลิกการตั้งค่าตัวแปร:
<?php
$a = "Hello world!";
echo
"The value of variable 'a' before unset: " . $a . "<br>";
unset($a);
echo
"The value of variable 'a' after unset: " . $a;
?>
ความหมายและการใช้งาน
ฟังก์ชัน unset() ยกเลิกการตั้งค่าตัวแปร
ไวยากรณ์
unset(variable, ....);
ค่าพารามิเตอร์
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ไม่มี |
---|---|
ประเภทการคืนสินค้า: | ไม่มี |
รุ่น PHP: | 4.0+ |
❮ ข้อมูลอ้างอิงการจัดการตัวแปร PHP