Method:
text()
Method Call:
include_once("core/messages/ERRORS.php");
$message = new ERRORS();
OR
include_once("core/messages/MESSAGES.php");
$message = new MESSAGES();
STRING $message->text(STRING: $arrayName, STRING: $indexName, [STRING: $extra]);
$arrayName is the name of the selected array and $indexName is the key of a particular element in that array. The optional $extra is a string that provides more specific information on the error/message and is included in the formatted return string.
Usage:array( "nan" => "### is not a number.", "missing" => "Missing input.###", "invalid" => "Invalid input.###", );then
include_once("core/messages/ERRORS.php"); $error = new ERRORS(); $pString = $error->text("inputError", "missing", " (Superadmin Password) ");will return the formatted string:
Missing input. (Superadmin Password)
(Any occurrence of '###' in the array element value is replaced by the optional string $extra or "" if $extra does not exist.)