freephoneid Posted March 19, 2009 Share Posted March 19, 2009 Hi, Can anyone tell me what is the equivalent of a Java HashSet or vector in PHP? Thanks! Link to comment https://forums.phpfreaks.com/topic/150234-equivalent-of-a-java-hashset-or-vector-in-php/ Share on other sites More sharing options...
corbin Posted March 19, 2009 Share Posted March 19, 2009 An associative array. $a = array( 'Corbin' => 'my name', 'freephoneid' => 'your name', 'Obama' => 'the president\'s name', ); foreach($a as $name => $what) { echo "$name is {$what}.\n"; } Link to comment https://forums.phpfreaks.com/topic/150234-equivalent-of-a-java-hashset-or-vector-in-php/#findComment-789003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.