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'); $destroyed = fm_unset('foo'); if ($destroyed) { echo 'foo existed and is now destroyed'; } else { echo 'foo did not exist so nothing was destroyed, sorry'; } /* Returns: foo existed and is now destroyed */ |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
fm_unset('foo'); $destroyed = fm_unset('foo'); if ($destroyed) { echo 'foo existed and is now destroyed'; } else { echo 'foo did not exist so nothing was destroyed, sorry'; } /* Returns: foo did not exist so nothing was destroyed, sorry */ |
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|