TwistPHP Documentation

arrayRelationalTree

File path: dist/twist/Core/Models/Tools.model.php
Namespace: Twist\Core\Models
Extends:

arrayRelationalTree

Parameters

Name Type Description
$arrStructurearrayn/a
[$strIDField = 'id']stringn/a
[$strParentIDField = 'parent_id']stringn/a
[$strChildrenKey = 'children']stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$arrStructure = array(=> 'foo'=> 'bar');
$strIDField 'id';
$strParentIDField 'parent_id';
$strChildrenKey 'children';

//Call the function arrayRelationalTree with the example vars
$resTools = new \Twist\Core\Models\Tools();
$resTools -> arrayRelationalTree($arrStructure$strIDField$strParentIDField$strChildrenKey);