array IPS_GetVariable (integer $VariableID)
VariableID | ID of the variable |
The following information is available as key => value pairs:
Table: Variable value
|
This function returns an array that contains information about the variable with the ID VariableID.
The value of a variable is get with the function GetValue since version 4.0
The functionality until version 3.4 is provided by the function "array IPS_GetVariableCompatibility(integer $VariableID)" since version 4.0.
// Since version 4.0 print_r(IPS_GetVariable(40770)); /* Examplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableType] => 0 [VariableUpdated] => 1246039629 ) */ print_r(IPS_GetVariableCompatibility(40770)); /* Examplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableUpdated] => 1246039629 [VariableValue] => Array ( [ValueArray] => Array ( ) [ValueBoolean] => 1 [ValueFloat] => 0 [ValueIndex] => Array ( [IndexInt] => 0 [IndexStr] => [IndexType] => 0 ) [ValueInteger] => 0 [ValueString] => [ValueType] => 0 ) ) */ // Until version 3.4 print_r(IPS_GetVariable(40770)); /* Exemplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableUpdated] => 1246039629 [VariableValue] => Array ( [ValueArray] => Array ( ) [ValueBoolean] => 1 [ValueFloat] => 0 [ValueIndex] => Array ( [IndexInt] => 0 [IndexStr] => [IndexType] => 0 ) [ValueInteger] => 0 [ValueString] => [ValueType] => 0 ) ) */