I have the following code:
<!DOCTYPE html>
<html>
<head>
<title>E6 L7</title>
<meta charset="utf-8">
</head>
<body>
<form method="post">
Detailed Content of the article:
<br>
<textarea name="full" cols="80" rows="5"></textarea>
<br>
Trimmed Display with the number of characters:
<br>
<input type="text" name="trim">
<br>
<input type="submit" name="sm" value="Post">
</form>
<?php
$fullcontent = $_POST['full'];
$trimnumber = $_POST['trim'];
?>
</body>
</html>
It looks like: Screenshot
How can I get "She is a" from the string in the screenshot? Or more generally, when I enter a number in the field "Trimmed Display with a number of characters", I would get it cut off nicely with whole words cut?. That means it will cut out "She is a" or "She is a very" but never result in "She is a ve".