latest_published_posts(0, 900, 'id, title, intro'); $tags = $wiki->all_tags(); shuffle($posts); shuffle($titles); for ($i = 0 ; $i < 500 ; $i++) { // $wiki->set_intro($posts[$i]['id'], some_lorem_intro()); // $wiki->set_status($posts[$i]['id'], 0); // $wiki->set_title($posts[$i]['id'], $titles[$i]); shuffle($tags); $c = ($i % 3) + 1; for ($j = 0; $j < $c; $j ++) { $wiki->link_tag_to_post($tags[$j]['id'], $posts[$i]['id']); } } echo "done!";