1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Php Sytax Help.

Discussion in 'PHP' started by aCebOy, Jan 24, 2013.

  1. #1
    Dear, I'm Trying tO Write A Syntax In Php, But I Can't,
    Look,
    $Page1 = '13';
    I'm Trying tO Write It In This Format,
    $Page = '10';
    $Page1 = '$Page+3';
    But Error Accoutred, Please Solve It ..
     
    aCebOy, Jan 24, 2013 IP
  2. Jeehan

    Jeehan Well-Known Member

    Messages:
    1,578
    Likes Received:
    31
    Best Answers:
    1
    Trophy Points:
    115
    #2
    $Page1= $Page + '3';
     
    Jeehan, Jan 24, 2013 IP
  3. aCebOy

    aCebOy Banned

    Messages:
    68
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    36
    #3
    ThaNks Dear .. ;)
     
    aCebOy, Jan 24, 2013 IP
  4. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #4
    you could also leave $Page1 = 13;
    without making it a string and leaving it an integer.
     
    ezprint2008, Jan 24, 2013 IP
  5. aCebOy

    aCebOy Banned

    Messages:
    68
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    36
    #5
    Ummm, ThaNks ..
     
    aCebOy, Jan 24, 2013 IP
  6. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #6
    well you are using it as a string '13'
    Math and Logic in PHP are different. sometimes you can get away with it, but once you get used to it, you'll be reminded along the way when certain functions wont see string as integer
     
    ezprint2008, Jan 24, 2013 IP