Welcome to the Cookbook

loading...

8.3.4 cleanInsert

Er is geen nog vertaling vertaling voor deze rubriek. Help ons en vertaal dit.. Meer informatie over vertalingen

string cleanInsert ($string, $options = array())

Cleans up a Set::insert formatted string with given $options depending on the 'clean' key in $options. The default method used is text but html is also available. The goal of this function is to replace all whitespace and unneeded markup around placeholders that did not get replaced by Set::insert.

You can use the following options in the options array:

$options = array(
	'clean' => array(
		'method' => 'text', // or html
	),

	'before' => '',
	'after' => ''
);
  1. $options = array(
  2. 'clean' => array(
  3. 'method' => 'text', // or html
  4. ),
  5. 'before' => '',
  6. 'after' => ''
  7. );