/ LJCPHPCodeDoc / LJCCommonLib / LJC / Split


Parameters
$text - The text value.

Syntax

PHP
public static function Split(string $text): array

Splits a string on whitespace.

Example

PHP
 // Splits a string on whitespace.
 private static function Split()
 {
   $text = "Now is the time.";
   $values = LJC::Split($text);
   $result = join(", ", $values);
 
   // result:
   // Now, is, the, time.
 }

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