Re: basic php problem
| From: | nicolas figaro | Date: | Thu, 15 Jun 2006 13:19:42 +0000 |
| Subject: | Re: basic php problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238089@lists.php.net to get a copy of this message | ||
nicolas figaro a écrit :
Ross a écrit :$page is local to your curly brackets if it's not used upper in your code. try to put "$page = 0; " before the if statement. N FI want to set a page number of a page if(!isset($_REQUEST['page'])) { $page =$_REQUEST['page'] + 1; echo "page is ".$page; // this echos out page is 1 } The problem is when I try and use $page further down in the body $page is 0 Question <?=$page; ?> <BR /> <? echo "page is".$page; ?> <?=$question[($page-1)]; ?>2nd try (did I miss the question at first try ?)