All pastes #935572 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-09 19:09 UTC
rendered paste body
		$row['note'] = preg_replace_callback('/\[(\*|\/|_|\-)(.+)\]/U',
			create_function('$matches', '
				switch ($matches[1]) {
					case "*":
						return "<b>" . $matches[2] . "</b>";
					case "/":
						return "<i>" . $matches[2] . "</i>";
					case "_":
						return "<u>" . $matches[2] . "</u>";
					case "-":
						return "<s>" . $matches[2] . "</s>";
				}
			'), $row['note']);