Jump to content

Archived

This topic is now archived and is closed to further replies.

shocker-z

*SOLVED* limit ourput to 24 charactors

Recommended Posts

Hi there,
How can i output only the first 24 charactors of a line?

its for trimming an address to only output 24 charactors to paste straight into a dos based program..


Regards
Liam

Share this post


Link to post
Share on other sites
Use something like

echo substr($string_to_trim, 0, 24); // Displays the first 24 characters.

Hope this helps.....

Share this post


Link to post
Share on other sites
[!--quoteo(post=366776:date=Apr 20 2006, 12:33 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Apr 20 2006, 12:33 PM) [snapback]366776[/snapback][/div][div class=\'quotemain\'][!--quotec--]
How can i output only the first 24 charactors of a line?
[/quote]
[code]echo substr ($your_string, 0 , 24)[/code]

Rob

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.