Creates nice sentences
Creates nice sentences.
This library is made for the use with Composer. Add it to your project by running
$ composer require bitandblack/sentence-construction.
Just call the method like that:
<?php use BitAndBlack\SentenceConstruction; $fruits = [ 'Apples', 'Bananas', 'Pears' ]; $sentence = SentenceConstruction::getImplodedSentence(', ', ' and ', $fruits); var_dump('I like '.$sentence);
This will dump
I like Apples, Bananas and Pears.
If you have any questions feel free to contact us under