PDA

View Full Version : add full stops and new line after full stop



ianhaney
04-20-2017, 09:11 PM
Hi

I am not sure if this is possible but I am using opencart 2.0.3.1 for a clients site and the product description is being pulled in from a excel spreadsheet but there are no full stops or line breaks so the content is one long sentence and looks confusing so was seeing if there was some way using php or javascript that full stops could be added and then after each full stop that a new line could be added or if there is some other alternative, an example URL is below, the product description is being wrapped in p tags

https://www.onestopappliances.co.uk/DOMESTIC-APPLIANCES/cheap-washing-machines/5kg-1000rpm-freestanding-washing-machine-white

see the description tab

Thank you in advance

styxlawyer
04-21-2017, 10:24 AM
The description on those pages look as though they are wrapped in <div>...</div> tags and not <p>...</p> tags, so I think you are writing about a different page. Adding full-stops and line breaks is easy in PHP. Just use the concatenation operator:



echo $string . ".<br />";