Help with Mod mathematical function

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Help with Mod mathematical function

    Hi,

    I am porting a vb application across to php but have come up against a small
    problem. The code uses the Mod calculation however I cannot find any Mod in
    php. The line of code that uses it looks like:

    Data = (index Mod 16)

    Anybody have any ideas how I recreate this in php? Both data and index are
    integers.

    Regards,
    Dean

    Dean Baldwin Guest

  2. Similar Questions and Discussions

    1. Anyone mathematical?
      Are you any good at maths? If so I was wondering if you can come up with a nice formular that I can program in Lingo that will calculate the angle...
    2. cfexecute for mathematical algorithms
      Hi I need to write C++ programs to do long mathematical algorithms which I want to combine into cfm pages. I know java is quicker but i dont use...
    3. Mathematical differences?!
      Hello all, I ported a algorithm from JavaScript to PHP and noticed that PHP outputs a different result than JS. For example: ...
    4. [PHP] Mathematical differences?!
      How could that be?! 1:1 the same code but different outputs? Is this a PHP-bug? :-? *feelin' kinda' smart arsed today, if no one noticed* ...
    5. [PHP] Help with Mod mathematical function
      http://us4.php.net/math The operator you want is % Eg: 5%3 = 2 <desa15@necso.es> wrote in message...
  3. #2

    Default Re: [PHP] Help with Mod mathematical function

    On Wednesday 06 August 2003 18:19, Dean Baldwin wrote:
    > I am porting a vb application across to php but have come up against a
    > small problem. The code uses the Mod calculation however I cannot find any
    > Mod in php. The line of code that uses it looks like:
    >
    > Data = (index Mod 16)
    >
    > Anybody have any ideas how I recreate this in php? Both data and index are
    > integers.
    manual > Operators

    --
    Jason Wong -> Gremlins Associates -> [url]www.gremlins.biz[/url]
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    ------------------------------------------
    Search the list archives before you post
    [url]http://marc.theaimsgroup.com/?l=php-general[/url]
    ------------------------------------------
    /*
    Putt's Law:
    Technology is dominated by two types of people:
    Those who understand what they do not manage.
    Those who manage what they do not understand.
    */

    Jason Wong Guest

  4. #3

    Default Re: Help with Mod mathematical function

    > Data = (index Mod 16)

    [url]http://www.php.net/manual/en/language.operators.arithmetic.php[/url]


    Nadim Attari Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139