OK what I will do is show you a very simple example that will wordwrap the text entered into a textarea first make this code as html for a form.
<html>
<head>
<title>Test My PHP</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<form name ="myform" action="phpprocess.php" method="post">
<textarea name ="message" cols="80" rows="20"></textarea>
<input type=submit value="Enter Message">
</form>
</body>
</html>
Then you use this simple php code to process the form notice that in the HTML form it is calleed phpprocess,php so you must name this that name or change the name of the file in the action = in the HTML form shown above. The below is a PHP file
<?php
echo wordwrap($_POST['message']);
?>
Then run the code after saving both those pages or files to a web server and play around with it, it is as simple as that.