While-loop inside an array - PHP
===

I want to make an array like this $array = array("'firstName1', 'lastName1'", "'firstName2', 'lastName2'", ......); I always get an error like this: Parse error: syntax error, unexpected 'while' (T_WHILE), expecting ')' in C:\wamp\www\Tests\index.php on line 11

    <!doctype html>
    <html>
    <head>
        <meta charset="utf=8">
    </head>
    <body>
    <?php
    if(isset($_POST['reg'])){
        $x=1;
        $a = array(
        while($x<=10):
        "'firstName$x', 'lastName$x'"; //I DONT KNOW WHAT TO DO IN THIS LINE//
        $x++;
        endwhile;
        );
        print_r($a);
    }
    ?>
    <form action="" method="post">
    <input type="text" name="number" /> <input type="submit" name="submit" value="Submit"/>
    </form>
        <form action="" method="post">
        <table>
        <?php
        if(isset($_POST['submit'])){
        for($i=1;$i<=$_POST['number'];$i++){
        echo "<tr>
        <td><input type='text' name='firstName$i' /></td>
        <td><input type='text' name='lastName$i' /></td>
        </tr>";
        }
        $i-=1;
        echo "<input type='hidden' name='hide' value='$i' />";
        }			
        ?>
        </table>
        <input type="submit" value="Register" name="reg"/>
        </form>
    </body>
    </html>