shocker-z Posted April 20, 2006 Share Posted April 20, 2006 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..RegardsLiam Quote Link to comment Share on other sites More sharing options...
slashemail Posted April 20, 2006 Share Posted April 20, 2006 Use something likeecho substr($string_to_trim, 0, 24); // Displays the first 24 characters.Hope this helps..... Quote Link to comment Share on other sites More sharing options...
Roberto Posted April 20, 2006 Share Posted April 20, 2006 [!--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 Quote Link to comment Share on other sites More sharing options...
shocker-z Posted April 20, 2006 Author Share Posted April 20, 2006 cheers lads :) *SOLVED* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.