htmltrim__recursive

Description

Trims a string or an array using html characters as well.

Syntax

mixed htmltrim__recursive (mixed $var[, int $level])



Parameter $var

Expected type: Mixed
Description:

Allowed types for $var
Allowed values Description
Array An array with values that need to be trimmed
String A string that needs to be trimmed



Parameter $level

Expected type: Integer
Description: What level we're at within the array



Return value

Expected type: Mixed
Description:

Possible types
Allowed values Description
Array $var with trimmed values
String A trimmed version of $var (if $var is a string)


Notes

  • Does not effect keys, only values.
  • May call itself recursively if needed.
  • Trims tabs, carriage returns, newlines, nulls and hard spaces
  • Will not go any further if $level is 26 or higher, even if the current value is an array
Advertisement: