Jump to content


Photo

Help With php overall


  • Please log in to reply
3 replies to this topic

#1 melvnatic

melvnatic
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 May 2006 - 01:19 AM

1) I'm trying to increment variables:

Include the file appcounter is stored in
++$appcounter;
Save appcounter to the same file

Am I doing anything wrong? Because $appcounter is incremented once, but if I try to access the script again, it doesn't work...


#2 insrtsnhere13

insrtsnhere13
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 18 May 2006 - 01:34 AM

$appcounter++;

thats the correct syntax

#3 melvnatic

melvnatic
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 18 May 2006 - 01:36 AM

++$appcounter; pre increments
$appcounter++; post increments, am I right?

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 18 May 2006 - 01:44 AM

[a href=\"http://www.tizag.com/phpT/operators.php\" target=\"_blank\"]Simple explanation[/a] of pre- and post-incrementing.
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users