Forum Moderators: coopster
$clipped_string=substr($_POST['textarea'],0,512);
or
<?
$position=14; // Define how many character you want to display.
$message="You are now joining over 2000 current";
$post = substr($message, 0, $position);
echo $post;
echo "...";
?>
or
$charLimit = 500;
if (strlen($_POST['desc']) <= $charLimit)
{
// do something
} else {
// do error
}
or
<?php
if (strlen($_POST['input']) > 300) {
// appropriate rejecting mechanism
} else {
// do what you want with it.
}
?>