...

View Full Version : Substr help



Crisp
03-10-2009, 05:48 AM
Sup.

I believe I did this with substr's a while ago, but forgot how.

I want the variable to only echo out..say 5 letters. And at the end it will have "..." without the quotes.

I completely forgot how to do this.
Can anyone "refresh" my mind?

Thanks.

oesxyl
03-10-2009, 06:17 AM
Sup.

I believe I did this with substr's a while ago, but forgot how.

I want the variable to only echo out..say 5 letters. And at the end it will have "..." without the quotes.

I completely forgot how to do this.
Can anyone "refresh" my mind?

Thanks.


$shorter = substr($longer,0,5);


http://www.php.net/manual/en/function.substr.php

best regards

Crisp
03-10-2009, 08:27 PM
That works.
Thanks dude. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum