yano3nora
10/22/2017 - 4:09 PM

[php: mb_strimwidth()] Ellipsis function on PHP. #php

[php: mb_strimwidth()] Ellipsis function on PHP. #php

<?php
/**
 * string mb_strimwidth()
 * @param  string $str
 * @param  int $start
 * @param  int $width
 * @param  string $trimmarker = ""
 * @parma  string $encoding = mb_internal_encoding()
 * @return string
 */

echo mb_strimwidth("Hello World", 0, 10, "...");
// "Hello W..."