<?php $string = 'This is line 1 <br /> And Line 2 <br /> And and line 3! <br />'; $i = 0; foreach( array_filter( explode( '<br />', $string)) as $line) { $i++; } echo $i;
You have javascript disabled. You will not be able to edit any code.