Version: 1
Type: Function
Category: Math Functions
License: GNU General Public License
Description: Factorizes a given number
<? function factorize ($number) { for ($i=2; $i < $number; $i++) { if (0 == ($number % $i)) { $factors[] = $i; $number = $number / $i; $i = 1; } } $factors[] = $number; return $factors; } ?>