- explode: documentation ( source)
<?php
class BlogCommentRepository {
public function find($something) {
echo "called!";
return array(1,2,3,4,5);
}
}
$blogCommentRepository = new BlogCommentRepository();
$blogCommentIds = "1,2,3,4,5";
foreach ($blogCommentRepository->find(explode(",", $blogCommentIds)) as $blogCommentId) {
}