Function: JScms_get_usergroup_all
avatar
Señor FAQ

¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.


Function: JScms_get_usergroup_all

The JScms_get_usergroup_all function retrieves all user groups from the specified table with their ID, name, and description.

Syntax


JScms_get_usergroup_all(object $jakdb, string $table): array
    

Parameters

  • $jakdb: (object) Database connection instance.
  • $table: (string) The name of the database table to query.

Returns

(array) An array of user groups with their id, name, and description.

Example Usage


<?php
$userGroups = JScms_get_usergroup_all($jakdb, "user_groups");
foreach ($userGroups as $group) {
    echo $group["id"] . ": " . $group["name"] . " - " . $group["description"] . "\n";
}
?>
    

Best Practices

  • Use this function to fetch all user groups for management or display purposes.
  • Ensure the table structure includes id, name, and description fields.

Common Issues

  • Empty Result: If no user groups exist, the function will return an empty array.
  • Invalid Table: Ensure the specified table name is correct.
Was this article helpful?
0 out of 0 found this helpful