Related Content
Generating Histogram Colour Analysis Graphs From Images In PHP
If you've ever looked at the settings in a digital camera, or have experience with image processing programs like GIMP, then you may have seen a colour histogram. This is a simple graph that shows the amount of different shades of colour are present in the image.
PHP:CSI - To Switch, Or Not To Switch?
I was writing unit tests for a API mapping function recently and came across this interesting issue. The code I was writing tests for was in a legacy codebase that I was making changes to, and it made sense to have some unit tests in there before I started work to ensure everything worked before and after.
Using PSR-4 With Composer
The PHP Standards Recommendations (called PSR) are a set of standards that aim to make certain aspects of working with PHP easier.
Generating A PDF From A Web Page Using PHP And Chrome
Generating a PDF document from a web page through PHP can be problematic. It's often something that seems quite simple, but actually generating the document can be difficult and time consuming.
PHP:CSI - Date Is Less Than One Month Ago
Working with logic surrounding dates can sometimes be difficult and it's fairly common to come across really subtle date and time based bugs.
I was recently shown a bug in a PHP application that looks like it should be working at face value, but doesn't actually produce the correct result.
An Introduction To Object Reflection In PHP
Reflection is used to gather more information about code during the runtime of the program. This allows code to inspect itself and to make small modifications, which is useful in a variety of situations.
Comments
I am trying to round $705,666.66 to the nearest whole thousand. Is $706,000 correct?
Submitted by Anonymous on Mon, 06/27/2011 - 00:30
Permalinkthank you soo much for the.. it was a great help. :) :) :)
Submitted by Anonymous on Sat, 02/11/2012 - 05:47
Permalink#Function to get original amount after percent increase or decrease function getOriginalAmountAfterPercentChange($currentNum, $percentChange){ $number = ($currentNum / ($percentChange + 1) * 100); #Get current number $precision = ((strlen((int)$number) -3) * -1); #Figure out what precision to round to return round($number, $precision); }
Submitted by Juan Sanchez on Fri, 07/13/2012 - 19:21
PermalinkSubmitted by philipnorton42 on Fri, 07/13/2012 - 22:20
PermalinkAdd new comment