levivel Posted August 24, 2006 Share Posted August 24, 2006 Hello, My task is to read a list of values from MySQL, compare it to a list from an array, ignore the values that exist both in the MySQL list and the array list, and select a random value from the remaining array. I've found functinos like array_slice, array_rand, multisort_array, but I can't seem to be able to put together the whole picture. Could anyone point me in the right direction?Thanks very much, Levi Link to comment https://forums.phpfreaks.com/topic/18514-array-question/ Share on other sites More sharing options...
Barand Posted August 24, 2006 Share Posted August 24, 2006 http://www.php.net/in_array checks if a value is in an arrayhttp://www.php.net/unset will remove array elementshttp://www.php.net/array_rand will return a key at random from the remaining array Link to comment https://forums.phpfreaks.com/topic/18514-array-question/#findComment-79729 Share on other sites More sharing options...
levivel Posted August 24, 2006 Author Share Posted August 24, 2006 wow thank you - I'll get right on this Link to comment https://forums.phpfreaks.com/topic/18514-array-question/#findComment-79730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.