Skip to content

Instantly share code, notes, and snippets.

@diyism
Created July 13, 2012 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diyism/3102406 to your computer and use it in GitHub Desktop.
Save diyism/3102406 to your computer and use it in GitHub Desktop.
count dividable
<?
$group=array();
for ($width=2; $width<=1024-18; ++$width)
{$count=0;
for ($gridWidth=2; $gridWidth<$width; ++$gridWidth)
{if ($width%$gridWidth==0)
{$count=$count+1;
}
}
$group[$count][]=$width;
}
ksort($group);
var_export($group);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment