by jmidas
12 replies
Hi, is anyone available to help me with a simple PHP problem? I am happy to pay for the time - it is probably something very simple, I'm just a PHP idiot. Please PM me.
#php #simple
  • Profile picture of the author GB2008
    Did you get this one fixed?
    Signature
    {{ DiscussionBoard.errors[636075].message }}
  • Profile picture of the author Plinko
    Allow me to assist.

    The answer is:

    $x = $x + 1;

    The solution almost always contains (+1).

    But seriously, we could probably help.
    Signature

    There's a difference between effective and efficient programming. Anyone can be effective. I strive to be efficient.

    {{ DiscussionBoard.errors[637180].message }}
    • Profile picture of the author AndyBlackSEO
      Originally Posted by Plinko View Post

      Allow me to assist.

      The answer is:

      = + 1;

      The solution almost always contains (+1).

      But seriously, we could probably help.
      This does the same job :-)

      $x++;
      Signature
      The Worlds Most Effective Video Creation and Marketing Software... CLICK HERE ...
      ... Create and rank professional marketing videos fast and efficiently.
      {{ DiscussionBoard.errors[637392].message }}
      • Profile picture of the author SEO_BOS
        >This does the same job :-)
        >$x++;

        Wish they had this in Ruby, miss it so much, ha ha!
        {{ DiscussionBoard.errors[639041].message }}
      • Profile picture of the author RedMatrix
        Originally Posted by AndyBlackSEO View Post

        This does the same job :-)

        ++;
        Ah, but what if you want to count by two's?

        $x .= +2
        Signature

        ~Dave

        {{ DiscussionBoard.errors[644685].message }}
        • Profile picture of the author spikyy
          Originally Posted by RedMatrix View Post

          Ah, but what if you want to count by two's?

          .= +2

          if you want to count by two's you use $x +=2
          {{ DiscussionBoard.errors[648878].message }}
      • Profile picture of the author spikyy
        Originally Posted by AndyBlackSEO View Post

        This does the same job :-)

        ++;
        ++$x; does the same job too
        {{ DiscussionBoard.errors[648875].message }}
        • Profile picture of the author Plinko
          Originally Posted by spikyy View Post

          ++; does the same job too
          Aha, but it doesn't exactly. See my post # 7.

          Originally Posted by Plinko

          Had a co-worker once try to convince me the prefixing increment was the same. Needless to say he spent 2 weeks trying to track an error down once hehehe.
          That's the postfix operator you are describing above and it differs from the prefix operator in that it will increment the counter and THEN evaluate the equation/line. To be honest, it doesn't matter one iota if it is on a line by itself, but still an important distinction if it gets used in a statement.

          But it does add 1 so it solves almost any problem
          Signature

          There's a difference between effective and efficient programming. Anyone can be effective. I strive to be efficient.

          {{ DiscussionBoard.errors[649252].message }}
  • Profile picture of the author Plinko
    I love the $x++ myself. Good ole post-increment operator. Or post-excrement, however you like to look at it! Had a co-worker once try to convince me the prefixing increment was the same. Needless to say he spent 2 weeks trying to track an error down once hehehe.

    Sorry to hear ruby doesn't shine as brightly. I guess that makes php the diamond in the rough? Oh dear, I better go before a tumbleweed blows by.

    Still looking to solve this php problem though.
    Signature

    There's a difference between effective and efficient programming. Anyone can be effective. I strive to be efficient.

    {{ DiscussionBoard.errors[639382].message }}
    • Profile picture of the author mogli
      I can help you if you are still looking for someone to solve your problem. Paste your code to my pm and I will help you
      {{ DiscussionBoard.errors[644486].message }}
  • Profile picture of the author imasong
    If you want to sharpen your PHP skills I recommend you head on over to phpvideotutorials dot com and check out the free lessons available. The free videos are very good and once you have mastered the basics you can move up to the paid courses which are also very good. This is of course assuming you want to devote some quality time to learning PHP - it does take time :-)
    {{ DiscussionBoard.errors[644829].message }}
  • Profile picture of the author VinceLaw
    Send me a PM. I am new to this forum. I may be able to help you.
    {{ DiscussionBoard.errors[648697].message }}

Trending Topics