문자열을 max 35 character
으로 중단하고 싶지만 지능적으로 중단하고 싶습니다. 내가 아래 문자열이 있다고 가정하자 :PHP 문자열의 더 똑똑한 문자열 중단
street name, sector name, city, state, pincode
또는
ABC Heights, Golf Road, City Test, City Sector
지금, 나는 이러한 문자열 어쨌든 침입 할 할을하지만, 어떤 잘못 라인을 중단하지 지적한다.
예 : 휴식은 여기
하지만 행운
ABC Heights, Golf Road,<br/>
City Test, City Sector
ABC Heights, Golf Road,City Te<br/>
st, City Sector
내가 시도하지 해답이 될 수 있습니다.
[wordwrap] (http://php.net/manual/en/function.wordwrap.php) + [nl2br] (http://php.net/nl2br) –