ini_section_delete

Deletes the indicated section of the currently open .ini file, should the section exist.

Syntax:

ini_section_delete(section);


Argument Description
section The section to delete.


Returns: N/A


Description

With this function you can delete a whole section of an ini file, which will also remove all key-value pairs that are associated with it.


Example:

ini_open( 'savedata.ini' );
ini_write_real( 'save1', 'Score', score );
ini_section_delete( 'save1' );
ini_close();

This example will open 'savedata.ini' and write a value to 'save1' > 'Score'. It will then delete the 'save1' section and close the .ini file.


Back: Ini Files
Next: ini_open_from_string
© Copyright YoYo Games Ltd. 2018 All Rights Reserved