08-07-2009, 01:56 PM
|
#3 (permalink)
|
|
The Contributor
Join Date: Jul 2009
Posts: 80
Thanks: 13
|
I have worked out that there is an error with this part of the script
Code:
$position=11; // Define how many characters you want to display.
$message="Jooria Refresh Your Website";
$post = substr($message,$position,1); // Find what is the last
character displaying.
We find it by getting only last
one character from your display message.
if($post !=" "){ // In this step,
if last character is not " "(space) do this step .
// Find until we found that last character is " "(space)
// by $position+1 (14+1=15, 15+1=16 until
we found " "(space) that mean character 20)
while($post !=" "){
$i=1;
$position=$position+$i;
$message="Jooria Refresh Your Website";
$post = substr($message,$position,1);
}
}
$post = substr($message,0,$position); // Display your message
echo $post;
echo "...";
?>
What it should do, is find if the last character is a space if not it moves one more till it finds that space.
Is there an error with this?
As it works, expect when searching for a sitename for some reason.
|
|
|
|