bool fm_unset ( string $name
)
Description
Allows you to destroy an existing variable. Just like when you were young, it’s important to clean up after yourself.
Parameters
name
(required)
The name of the variable to destroy.
Return
Returns true if the variable existed or false if the variable did not exist.
Errors
There are no errors for this function.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
fm_set_variable('foo', 'bar'); echo fm_unset('foo') ? 'foo is destroyed' : 'Ain\'t no foo to destroy'; /* Returns: foo is setdestroyed */ |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
fm_unset('foo'); echo fm_unset('foo') ? 'foo is destroyed' : 'ain\'t no foo'; /* Returns: ain't no foo */ |