Aug 16, 2002 #1 sfc Programmer Apr 18, 2002 4 US Hi, Does anyone know how to delete an element from associative array? For example: $test = Array("test1" => "data1", "test2" => "data2","test3" => "data3" How to delete test2? Thanks
Hi, Does anyone know how to delete an element from associative array? For example: $test = Array("test1" => "data1", "test2" => "data2","test3" => "data3" How to delete test2? Thanks
Aug 16, 2002 #2 danielhozac Programmer Aug 21, 2001 2,058 SE unset($test['test2']); should do what you want. More info at http://www.php.net/unset //Daniel Upvote 0 Downvote