Skip to content
Advertisement

Tag: math

Unsupported operand types

I am working on a shopping cart function for a website and have stumbled across this error: Fatal error: Unsupported operand types in … on line xx I think this may be because I am performing some math between a variable and a value within an array. What I am not sure of is how to perform math on a

PHP number abbreviator

Edit: Function below now does the abbreviation correctly, implemented @Asad ‘s solution Hi I am currently working on a like button, I’ve got all the base functionality working nicely however I have started the number abbreviation code and hit a wall as I can’t figure out how to make the abbreviation more precise. I have a number, e.g. 1000, 1230,

Formulas to Calculate Geo Proximity

I need to implement a Geo proximity search in my application but I’m very confused regarding the correct formula to use. After some searches in the Web and in StackOverflow I found that the solutions are: Use the Haversine Formula Use the Great-Circle Distance Formula Use a Spatial Search Engine in the Database Option #3 is really not an option

Advertisement