In circle geometry sometimes we work in radians, and sometimes we work in degrees. Switch between them in PHP is easy using the rad2deg () PHP function. [read more]
If you have an array in PHP and you want to see what's inside of it, you can use the print_r () function to output the array in a human readable form. This spares you the trouble of having to setup a print loop just to check the contents of the array. [read more]
Eventually every PHP programmer gets asked to do some WordPress modifications. This quick tutorial shows you how to make a child theme in WordPress. A child theme is useful because you have to do less code than a full theme from scratch, and it allows you to update the parent theme without losing your modifications. [read more]
Some people tweet a lot, but you can't always think of something deep and meaningful, or even interesting to say. Boggle your followers with some truly bizarre tweets, using our random tweet generator. Adjust the code to come up with your own random tweets. [read more]
In php if you want to raise a number to a power, you use the pow () function. The pow () function expects two inputs, the number you are raising to a power, and the power you are raising it by.
There is a simple function you can use in PHP to get lot of information about the PHP that is running on your server. That function is phpinfo (). You can find out the version you are running, all of the settings, etc. It is also a simple way to check if your host allows php!
Natural logarithm is found using a base of e which is approximately equal to 2.71. In PHP you can use the Log () PHP function to find the natural logarithm of a number. You can also find the logarithm of a different base using the same function.
The Octdec () PHP Function is used to convert an octal number into a decimal. This is similar to the base_convert () PHP function only it works specifically for turning octal numbers into base 10. The opposite function, Decoct (), converts a decimal into an octal number.
When you are returning a number you may have a very specific way you need it formatted, whether this is for it to display correctly or to operate properly later in your program. You can use the number_format () PHP function to control all aspects of the numbers format.
Today at my house the wind chill makes the temperature -34 degrees Fahrenheit. Yikes! But just how is that calculated? I wrote a PHP program to calculate wind chill based on temperature and wind speed. [read more]