Mon-Thu 12:00-23:00, Fri-Sat 11:00-14:30, 17:00 - 02:00, Sun 12:00-23:00.
I want to end up with:
<li>Mon-Thu 12:00-23:00</li>
<li>Fri-Sat 11:00-14:30, 17:00 - 02:00</li>
<li>Sun 12:00-23:00</li>
I've tried this code but it doesn't do anything, just repeats the string.
Code: Select all
$openHours = preg_replace('/[A-Z]/', "</li>\n<li>\\0", $openHours, 1);
I'm a total regexp n00b - can anyone advise?
Cheers
Matt