Name

hdf_set_value — Set the value of a named node.

Description

bool hdf_set_value(hdf,  
 name,  
 value); 
resource  hdf;
string  name;
mixed  value;

Sets the value of node name in HDF resource hdf. Returns true on success, false on failure. value can be an array in which case key => value pairs are mapped to node_name => value. This also works for multi-dimensional arrays.

[Note]Note

The value gets converted to a string in the HDF.

Example 7. hdf_set_value example

			
<?php
$hdf = hdf_init();
hdf_set_value($hdf, 'data.node', 'my value');
print hdf_get_value($hdf, 'data.node', 'default value');
?>