Help me Finish this block script please

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   re: Help me Finish this block script please
SidewinderX
CZ Super Newbie
SidewinderX has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 06, 2004
0.01 posts per day
Posts: 39
Points: 1,333
   
I have a calculus test to study for today and im flying home tomorrow so I wont have much time to take a look untill wednessday but i was thinking rather than have it cut off after 200 or 250 characters or what ever you have it set at, make it so it cuts if off at the nearest word to to 250 characters but no greater



Back to top Reply with quote
#2   re: Help me Finish this block script please
syruss2125
CZ Newbie
syruss2125 has been a member for over 17 year's 17 Year Member
usa.gif kansas.gif
Gender: Male
Status: Offline
Joined: Nov 08, 2006
0.00 posts per day
Posts: 19
Points: 50
   
Ya thought would be nice.. but hey all this i'm working with is barrowed code and just some darn good luck... LMAO....

So far it's working for me.. hehe...




Back to top Reply with quote
#3   re: Help me Finish this block script please
SidewinderX
CZ Super Newbie
SidewinderX has been a member for over 19 year's 19 Year Member
Status: Offline
Joined: Aug 06, 2004
0.01 posts per day
Posts: 39
Points: 1,333
   
all it would require is you to create a loop between say the 200th character and the 250th character and make an if statement to break the loop when the variable is a white space

for($i=200, $i<=250, i++)(
$char = //get the i'th character
    if($char == " "){
    $charLength = $i;
    break;
    }
}


and rather than using 250 for the number of characters use $charLength


Back to top Reply with quote
#4   re: Help me Finish this block script please
syruss2125
CZ Newbie
syruss2125 has been a member for over 17 year's 17 Year Member
usa.gif kansas.gif
Gender: Male
Status: Offline
Joined: Nov 08, 2006
0.00 posts per day
Posts: 19
Points: 50
   
ok thanks...

Makes since



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum