• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 641
  • Last Modified:

Rewrite excel formula to a php statement

I am trying to write a php statement which come from a excel formula.
I was trying to figure out how to do the MOD in php, but I didn't know how to do it correctly. Thanks for your help.

= intval ($total)+( intval (MOD($total,1)/0.3))+(SUM(MOD($total,1))-( intval (MOD($total ,1)/0.3))*0.3)

Open in new window

  • 2
1 Solution
Terry WoodsIT GuruCommented:
Mod in php is done with a % sign.

10 % 3
Should return 1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now