Listing Data From a CMS Text Box

4 posts by 3 authors in: Forums > CMS Builder
Last Post: July 15, 2013   (RSS)

By nmsinc - July 14, 2013

I have a CMS text box the contains heating zone data as:

Zone 1 = Hallway

Zone 2 = Walkway

Zone 3 = Garage

Each zone within the text box is followed by a CR to separate each zone

When using the detail page to list the data with <?php echo htmlencode($zoneRecord['zone_list']) ?>  - it details out as:

Zone 1 = Hallway Zone 2 = Walkway Zone 3 = Garage

Is there a way to code the list on the detail page back to the way it was entered in the text box?

Thanks - NMSINC

nmsinc

By jenolan - July 14, 2013

<?php echo htmlencode(str_replace( "\n", '<br />', $zoneRecord['zone_list'])) ?>

---



Peace and Long Life

By Toledoh - July 14, 2013

Would removing the htmlencode work also?  <?php echo $zoneRecord['zone_list'] ?>

Cheers,

Tim (toledoh.com.au)