<?php $str= 'To do list: - Buy milk - Feed cat'; var_export( preg_replace( '/ (?=-)/', "\n", $str ) );
You have javascript disabled. You will not be able to edit any code.