need help with code

Discussion in 'PHP' started by izlik, Jan 2, 2009.

  1. #1
    Hello

    I have this code bellow wich is a part of a script on my page. I wanted to edit the size of "First" And "Pevious" once they are displayed onto the site and tryed to add "<font size="4">" but then i get Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /public_html/side.php on line 93

    How can i change the size of "First" And "Pevious" without the code breaking ?

     
    izlik, Jan 2, 2009 IP
  2. Yesideez

    Yesideez Peon

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    echo '<a href="'.$_SERVER['PHP_SELF'].'?pagenum=1&tag='.$_GET['tag'].'" class="nextprev">&lt;&lt;-First</a>';
    echo " ";
    $previous = $pagenum-1;
    echo '<a href="'.$_SERVER['PHP_SELF'].'?pagenum='.$previous.'&tag='.$_GET['tag'].'" class="nextprev">&lt;- Previous</a>';
    PHP:
    Next in the BODY part declare some CSS:
    <style type="text/css">
      a.nextprev {
        font-family: arial, verdana, sans-serif;
        font-size: 20px;
      }
    </style>
    Code (markup):
    Two things:
    1. I couldn't see any </a> to close the anchor.
    2. If you're going to display < and/or > on the screen use &lt; and &gt; respectively.
     
    Yesideez, Jan 2, 2009 IP
  3. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #3
    i added what you said into the body tag but nothing happend :/ it didint work.
     
    izlik, Jan 3, 2009 IP
  4. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    add style=\"font-size=4;\" in your a tag
    good luck
     
    fairuz.ismail, Jan 3, 2009 IP
  5. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #5
    I got what Yesideez said to work now but i need the same thing done for these 2 bellow and i keep breaking the code when i try to fix then like Yesideez did, can someone help please?
    
    echo "<a href='{$_SERVER['PHP_SELF']}?pagenum=$next&amp;tag={$_GET['tag']}'>Next -></a>";
    echo " ";
    echo "<a href='{$_SERVER['PHP_SELF']}?pagenum=$last&amp;tag={$_GET['tag']}'>Last ->></a>";
    PHP:
     
    izlik, Jan 3, 2009 IP
  6. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    echo "<a href='{$_SERVER['PHP_SELF']}?pagenum=$next&amp;tag={$_GET['tag']}'  class='nextprev'>Next -></a>";
    echo " ";
    echo "<a href='{$_SERVER['PHP_SELF']}?pagenum=$last&amp;tag={$_GET['tag']}'  class='nextprev'>Last ->></a>";
    PHP:
     
    fairuz.ismail, Jan 4, 2009 IP
  7. sikka2010

    sikka2010 Well-Known Member

    Messages:
    1,578
    Likes Received:
    143
    Best Answers:
    0
    Trophy Points:
    175
    #7
    i think ho gayi teri jitni help honi thi ab mauj kar
     
    sikka2010, Jan 4, 2009 IP