Go to: Synopsis. Return value. MEL examples.

Synopsis

int tokenizeList( string $list, string $tokenizedList[] )

Takes a string $list representing a list of items. The items can be either whitespace- or comma-separated. The individual items in the list are returned as elements of the result array, stored in $tokenizedList.

Return value

None

Arguments

Variable Name Variable Type Description
$liststringThe string of values to tokenize. Separated by either whitespace or commas.
$tokenizedListstring[]The items in $list, after tokenization

MEL examples

  string $list = "1 6 7, 54";
  string $tokenizedList[];
  tokenizeList($list, $tokenizedList);
  // Result : 1 //

  print $tokenizedList;
 // 1

 // 6

 // 7

 // 54