Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP?
Answer: On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().
Is it helpful? Yes No

Most helpful rated by users:

©2026 WithoutBook