PWaddict Posted October 31 Share Posted October 31 Hello, I'm outputing repeater content in ProcessWire way like this instead of the classic foreach. <?= preg_replace('/(.*),/','$1 &', $page->datetimes->implode(", ", "{day} {time_start}-{time_end}")) // Monday 19:00-21:00, Tuesday 19:00-21:00 & Wednesday 19:00-21:00 ?> Is there a ProcessWire way to output the content like below where if the time_start and time_end have the same values on all days then display them only once at the end of the string: Monday, Tuesday & Wednesday 19:00-21:00 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now