Re: PDF_function HELP again!!! :(
| From: | Jeffrey | Date: | Tue, 30 Jul 2002 18:59:13 +0000 |
| Subject: | Re: PDF_function HELP again!!! :( | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110391@lists.php.net to get a copy of this message | ||
Diregard the missing "{" bracket its not the problem, I dont why its missing
from my post.
Jeff
Jeffrey <dump@relaypoint.net> wrote in message
news:20020730184118.35774.qmail@pb1.pair.com...
> Here we go again; I posted the message "pdflib, NEED HELP with
> function problem (newby)" and thank you to all that helped. Even
> after that help, seems I cant understand scope to well.
>
> Im trying to make a function that creates another page when I
> have reached the bottom of a page. For some reason everytime I try to
> include a PDF_function call inside a function I get an out of scope
> error message. Like so:
>
> "Fatal error: PDFlib error: function 'PDF_begin_page' must not be
> called in 'page' scope"
>
> The function I created is below
>
> function next_page($throw)
> {
> global $p;
>
> if ($throw = "open")
> {
> PDF_begin_page($p, 600, 800);
> return;
> }
>
> if ($throw = "close")
>
>
> PDF_end_page($p);
> return;
> }
> }
>
> All I do is put in to var $throw open or close and its not
> working; $p is global, what am I doing wrong? Im really having a terrible
> time
> with scope and php, no calles from PDF seem to want to work inside a
> function. Thanks for any help you guys can give me. Im pulling my hair
out.
> PHP is
> a great language but this scope stuff is givin me fits.
>
> Jeff
>
>
>