hi everybody, i am new to php programming, i have this code in page number 1:
<?php $pages = array( 'number1' => 'number1.php', 'number2' => 'number2.php', 'number3' => 'number3.php', 'number4' => 'number4.php', ); if (isset($_GET['page']) && isset($pages[$_GET['page']])) { include($pages[$_GET['page']]); } else { include($pages['number1']); }?>
but i dont want to have 4 pages called number1, number2, number3, number4 i wanna have just 1 page that have a code like this: <?php$number1 = "<img src=\"images/number1.gif\" width=\"57\" height=\"171\" alt=\"\">";$number2 = "<img src=\"images/number2.gif\" width=\"57\" height=\"171\" alt=\"\">";$number3 = "<img src=\"images/number3.gif\" width=\"57\" height=\"171\" alt=\"\">";$number4 = "<img src=\"images/number4.gif\" width=\"57\" height=\"171\" alt=\"\">";?>
so how can i include that second page through the first code? thanks for your time