/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function text_convert2columns($colcontent, $columns) { $coloutput = ''; $l = 0; for($i=1;$i<=$columns;$i++) { $new_string = ''; $coloutput .= '<div class="txt-column-'.$i.'">'; for($g=$l;$g<=$c;$g++) { { $new_string.=$words[$g]." "; } else { $l = $g; break; } } $coloutput .= $new_string; $coloutput .= '</div>'; } return $coloutput; }