/ LJCPHPCodeDoc / LJCGenTextSectionLib / LJCSections / Get


Parameters
$key - The element key.
$throwError - Indicates if an error should be thrown if the key is not found.

Returns

The object with the matching key value.

Syntax

PHP
public function Get($key, bool $showError = true) : ?LJCSection

Get the item by Key value.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCGenTextSectionLib.php";
 
 $sections = new LJCSections();
 $section = new LJCSection("SectionName");
 $sections->Add($section, $section->Name);
 
 $section = LJCSections->Get("SectionName");

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