1. Computing
Send to a Friend via Email
Angela Bradley



Follow me on:

Stripping Slashes

Saturday April 12, 2014

If you are going to store information safely in your database, you have probably added slashes to turn I'm into I\'m.  Now you want to pull that information out of your database for use, and you need to remove the slashes.  You would use the stripslashes () function.

Finding the Square Root

Sunday April 6, 2014

Finding the square root of a number in PHP is easy.  You simply use the SQRT () function.  So, for example, SQRT (25) is 5!

Sin () of a number

Friday April 4, 2014

If you need to calculate the sine of a number, you use the PHP function sin (). Sin is a mathematical function used to calculate the sine of a given number. The result is returned in radians.

Rounding Numbers

Friday March 28, 2014

In PHP there is a variety of ways to round numbers.  You can use ceil () to round up or floor () to round down.  However if you just want to do a traditional round, where .5 of a number and above rounds up, you would use the round () function.  [read more]

Connecting to MySQL using Java

Thursday March 27, 2014

Although PHP and MySQL are a match made in heaven, sometimes an employer will need your MySQL expertise for a Java project.  This quick tutorial teaches you how to connect to a MySQL database using Java.  By guest author Kevin Enax.

Where to freelance?

Thursday March 27, 2014

As a PHP developer, or another type of programmer you may find yourself looking for freelance work opportunities.  But where do you go?  In this article I share my personal experience using several popular freelance websites.  Please share your own experiences in the blog comments!

Require () in PHP

Friday March 21, 2014

The require () function in PHP is used to include a file inside of another file.  It works very similarly to the include () function, however it is always pulled even if it won't be executed.  This is called a server side include.  [read more]

Random Numbers

Friday March 14, 2014

To generate a random number in PHP we use the rand () function.  You can choose the minimum and maximum values that the random number must fall between.  If left unspecified, the highest number that can be generated in Windows is 32768.  [read more]

Rad2Deg() PHP function

Friday March 7, 2014

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]

Print_R() for arrays

Sunday March 2, 2014

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]

©2014 About.com. All rights reserved.