Просмотр поста

.
~XeOn~
$ex = explode(' ', $str);
$c = 5;
for ($i = 1; $i <= $c; $i++)
{
    $words_array[$i-1] = $ex[array_rand($ex)];
}
$serialize = serialize($word_array);
mysql_query("INSERT INTO `table` SET `words` = '$word_array'");