Return to Snippet

Revision: 42013
at February 26, 2011 02:26 by zepner


Initial Code
<? 
$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet.'; 
$words = explode(" ",$text); $cntWords = count($words); $splitWords = round($cntWords/2);
?>
<div class="text">
    <p class="l"><? for ($i=0;$i<=$splitWords;$i++) print $words[$i].' '; $halfPoint = $i; ?></p>
    <p class="r"><? for ($i=$halfPoint;$i<=$cntWords;$i++) print $words[$i].' '; ?></p>
</div>

Initial URL
http://pcvst.urbanedgeny.com/availabilities

Initial Description

                                

Initial Title
Split text into 2 paragraphs

Initial Tags
css, php

Initial Language
PHP