Tag

recursive

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 5, 2024 · Backend Development

Building and Displaying Nested Category Trees with PHP and MySQL

This guide explains how to design a MySQL categories table, retrieve records with PHP, construct a recursive tree based on parent_id, and render the hierarchical structure as nested HTML lists, providing a complete solution for managing product categories in e‑commerce applications.

Category TreeMySQLPHP
0 likes · 5 min read
Building and Displaying Nested Category Trees with PHP and MySQL
php中文网 Courses
php中文网 Courses
Jan 5, 2024 · Backend Development

Understanding PHP count() and sizeof() Functions: Differences, Usage, and Tips

This article explains the PHP count() and sizeof() functions, clarifying that they are aliases with identical behavior, showing basic usage examples, discussing when to prefer one over the other, and offering performance notes, recursive counting, and object handling tips for developers.

PHParraysbackend
0 likes · 4 min read
Understanding PHP count() and sizeof() Functions: Differences, Usage, and Tips
php中文网 Courses
php中文网 Courses
Dec 29, 2023 · Backend Development

How to Traverse Directories and Retrieve File Information in PHP

This article explains how to use PHP functions such as opendir, readdir, is_dir, and scandir to open directories, read file names, perform recursive traversal of subfolders, and retrieve file information, providing clear code examples for each method.

PHPdirectory traversalopendir
0 likes · 5 min read
How to Traverse Directories and Retrieve File Information in PHP
php中文网 Courses
php中文网 Courses
Sep 4, 2023 · Fundamentals

Binary Search: Explanation and PHP Implementations

Binary search is an efficient O(log n) algorithm for locating a target value in a sorted array, and this article explains its step-by-step process, provides iterative and recursive PHP code examples, and discusses their usage and performance considerations.

O(log n)PHPalgorithm
0 likes · 6 min read
Binary Search: Explanation and PHP Implementations
Python Programming Learning Circle
Python Programming Learning Circle
May 27, 2020 · Fundamentals

Solving the 24‑Point Game with Python: Two Algorithmic Approaches

This article explains how to determine whether any four playing cards can be combined using addition, subtraction, multiplication, and division (with parentheses) to reach 24, presenting two Python implementations—an exhaustive enumeration method and a more efficient recursive combination technique—along with performance comparisons.

24-point gamePerformancealgorithm
0 likes · 8 min read
Solving the 24‑Point Game with Python: Two Algorithmic Approaches