Hate Posted September 16, 2010 Share Posted September 16, 2010 Hi, I have an array of items and I randomly want to remove one from the array. What's the easiest way to go about this? Link to comment https://forums.phpfreaks.com/topic/213600-randomly-select-an-item/ Share on other sites More sharing options...
Andy-H Posted September 16, 2010 Share Posted September 16, 2010 unset($array[array_rand($array)]); Link to comment https://forums.phpfreaks.com/topic/213600-randomly-select-an-item/#findComment-1111786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.