Combining multiple php files

The current code provided on previous question is working. I need help to modify it so I can tell it what php files to combine.
The code below combines every .php file it finds in a directory.
(ie: Need to combine only the following pages, page1.php, page2.php, page3.php, page4.php, page5.php, page6.php, page7.php, page8.php, page9.php, page10.php, page11.php, page12.php )
Thanks in advance.
<?php

foreach (glob("*.php") as $filename) {
  $code.=file_get_contents("./$filename");
}
file_put_contents("./combined.php",$code); 

?>

Answer:

If you know the file names and they are not going to change then you can do this:
<?php
$files = array("a.php", "b.php", "c.php");
$comb;
foreach ($files as $k)
{
    $comb .= file_get_contents("./".$k);
}
file_put_contents("./combined.php",$comb);
?>
If you are getting them from a form submission then do something like this:
<?php
$files = array();
foreach ($_POST['files_to_combine'] as $k)
{
    $files .= $k;
}
$comb;
foreach ($files as $k)
{
    $comb .= file_get_contents("./".$k);
}
file_put_contents("./combined.php",$comb);
?>
** As a security note please make sure to sanitize your inputs if you use the second method! this code is only a proof of concept to make it simple to understand and use.

http://stackoverflow.com/questions/25433555/combining-multiple-php-files