All you need to do is use:
$pos=strpos($content, ' ', 200);
substr($content,0,$pos );
More Related Contents:
- How to include a PHP variable inside a MySQL statement
- PHP random string generator
- How to Truncate a string in PHP to the word closest to a certain number of characters?
- How do I strip all spaces out of a string in PHP? [duplicate]
- Highlight the difference between two strings in PHP
- How to replace Microsoft-encoded quotes in PHP
- Curly braces in string in PHP
- Insert string at specified position
- Truncate text containing HTML, ignoring tags
- php/mysql with multiple queries
- String with array structure to Array [duplicate]
- When to use strtr vs str_replace?
- Is there any way to detect strings like putjbtghguhjjjanika?
- Split camelCase word into words with php preg_match (Regular Expression)
- How can I capture the result of var_dump to a string?
- PHP – remove tag from string
- Concatenation with addition in it doesn’t work as expected
- Get characters after last / in url
- Manipulate a url string by adding GET parameters
- Convert a String into an Array of Characters
- Methods to remove specific characters from string?
- How to remove the leading character from a string?
- PHP: Best way to extract text within parenthesis?
- How do I remove the last comma from a string using PHP?
- Do I need to escape backslashes in PHP?
- PHP prepend leading zero before single digit number, on-the-fly [duplicate]
- Using str_split on a UTF-8 encoded string
- How to remove all leading zeroes in a string
- How to prefix a positive number with plus sign in PHP
- Limit String Length