PHP DS / Map clear () function

PHP

Syntax:
void public DsMap::clear (void)
Parameter: does not take any parameters.Returned value:This function does not return any value.The program below illustrates the DS / Map::clear function()in PHP:
// PHP -exampler clear()
// Ds / map function 
// Create a map $map = new DsMap ([ " 1 " = > "Geeks" , " 2 " = > "for" , "3" = > "Geeks" ]);  
// Remove all values ​​from the map $map -> clear(); print_r ( $map );  
?>
Exit :
DsMap Object()
Link : http://php.net/manual/en/ds-map.clear.php



Get Solution for free from DataCamp guru