Hi,
I have been surprised that for the following: switch ( $x ) { case 'Add': $db->query(build_insert_sql('event', $eventfieldlist)); $event_id = $db->insert_id; $db->query('INSERT INTO event_aud (`id`, `aud_id`) VALUES ("'.$event_id.'","'.$_POST['aud_id'].'")'); break;
case 'Edit': $db->query(build_update_sql('event', $eventfieldlist, $_POST['id'])); $template['top_msg'] .= '<p>hi there </p>'; break; default: $template['top_msg'] .= '<p>hi there </p>'; break; }
one can only fold the entire switch, and not each case.
would this be too hard to implement?
On 6. Oct 2006, at 22:12, David Clark wrote:
I have been surprised that for the following: switch ( $x ) { case 'Add': [...] one can only fold the entire switch, and not each case.
would this be too hard to implement?
You can wrap the body of each case in { … } to get foldings or alternative add case + break as fold start/stop markers for the PHP/ HTML grammar.