/ LJCPHPCodeDoc / LJCCommonLib / LJC / RemoveString


Parameters
$array - The array object.
$value - The string value.

Syntax

PHP
public static function RemoveString(array &$array, string $value): void

Remove an element from a string array by value.

Example

PHP
 // Remove element from string array by value.
 private static function RemoveString()
 {
   $array = ["First", "Second", "Third"];
   LJC::RemoveString($array, "Second");
   $result = join(" ", $array);
 
   // result:
   // First Third
 }

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