Recursive function for php, mysql, suckerfish

This is code snippet for php recursive function that works with mysql and suckerfish, for instance if we have database with table named menu

=========================================
id | parent_id | name     | link
=========================================
1  | 0         | home     | index.php
2  | 0         | about us | about_us.php
3  | 2         | carreer  | career.php
4  | 2         | jobs     | jobs.php
==========================================

and we want to use jquery suckerfish menu to display it.
Continue reading “Recursive function for php, mysql, suckerfish”