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 Link to comment https://forums.phpfreaks.com/topic/7940-solved-limit-ourput-to-24-charactors/ 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..... Link to comment https://forums.phpfreaks.com/topic/7940-solved-limit-ourput-to-24-charactors/#findComment-28927 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 Link to comment https://forums.phpfreaks.com/topic/7940-solved-limit-ourput-to-24-charactors/#findComment-28928 Share on other sites More sharing options...
shocker-z Posted April 20, 2006 Author Share Posted April 20, 2006 cheers lads :) *SOLVED* Link to comment https://forums.phpfreaks.com/topic/7940-solved-limit-ourput-to-24-charactors/#findComment-28939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.