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? Quote Link to comment Share on other sites More sharing options...
Andy-H Posted September 16, 2010 Share Posted September 16, 2010 unset($array[array_rand($array)]); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.