![]() |
The tag is: |
Example:
PHP
<?php
$first3word = 'WWE is the best sports';
$first3word = implode(' ', array_slice(explode(' ', $first3word), 0, 3));
echo $first3word;
?>
How to extract first 3 words from a sentence by PHP | PHP String Tutorial |
Read Full: | PHP String Tutorial |
Category: | Web Tutorial |
Sub Category: | PHP String Tutorial |
Uploaded by: | Admin |
Views: | 131 |