/ LJCPHPCodeDoc / LJCCommonLib / LJC / GetTokens


Parameters
$text - The text value.
$splitString - The split string value.

Returns

The split string array.

Syntax

PHP
public static function GetTokens(string $text, ?string $splitString = null)

Get string tokens.

Example

PHP
 // Get string tokens.
 private static function GetTokens()
 {
   $text = "Now|is|the|time.";
   $values = LJC::GetTokens($text, "/\|/");
   $result = join(", ", $values);
 
   // result:
   // Now, is, the, time.
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.