whelpton Posted June 29, 2008 Share Posted June 29, 2008 Ok, I am using strings to display email contents, I was wondering if there's any way of making my subject string ($strSubject) only display a certain number of characters, for example 25, so that it dosnt break my table formatting. The code I am using is below. $arrMessage = $objPop3->getParsedHeaders($objPop3->numMsg()-$i); $strDate = $arrMessage['Delivery-date']; $strFrom = $arrMessage['From']; $strReplyTo = $arrMessage['Reply-To']; $strSubject = (strlen($arrMessage['Subject'])<1)?'(No Subject)':$arrMessage['Subject']; Thanks Quote Link to comment Share on other sites More sharing options...
br0ken Posted June 29, 2008 Share Posted June 29, 2008 $strSubject = substr($arrMessage['Subject'], 0, 25); http://php.net/substr Quote Link to comment Share on other sites More sharing options...
whelpton Posted June 29, 2008 Author Share Posted June 29, 2008 Cheers but I dont understand how to put that into the code that I am using already, im a real beginner to php Quote Link to comment Share on other sites More sharing options...
whelpton Posted June 29, 2008 Author Share Posted June 29, 2008 Thanks ive got it now actually =) 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.