Can anyone take the for loop out of this code?
The following replaces the loop using higher-order functions:

$para = function($p) { return "&lt;p&gt;$p&lt;/p&gt;\n"; };
$content = implode('', array_map($para, array_slice($paragraphs, 0,  $paragraph_count)));