Web Analytics Made Easy -
StatCounter {page_num} - CodingForum

Announcement

Collapse
No announcement yet.

{page_num}

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • {page_num}

    Hi friends

    Recently i came across {PAGE_NUM} in dompdf.
    I wanted to take the value from this variable and do some decision making.
    PHP Code:
    if ("{PAGE_NUM}"=="1")
    {
      print 
    "2";

    The condition never succeed. I tried to get type of variable and its string.

    Can anyone guide me, how can i fetch the value into variable ($var)?
    And secondly what does {PAGE_NUM} means? and it can be only used as "{PAGE_NUM}". without "", it gives an error.

    Thanks
    -------------------------
    Shailesh Patil
    -------------------------

  • #2
    I haven't used dompdf in a while, but according to the docs the variable you want to use is $PAGE_NUM. Based on that you would be doing something like this:
    PHP Code:
    if($PAGE_NUM == 1)
    {
        print 
    '2';

    Comment

    Working...
    X