1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.
Angela Bradley

Angela\'s PHP / MySQL Blog

By

Follow me on:

The Fibonacci Sequence

Wednesday May 28, 2014

0, 1, 1, 2, 3, 5, 8, 13, 21... seem familiar?  It's the Fibonacci sequence!  The Fibonacci sequence is calculated by adding the last two numbers together to get the next number in the series.  This simple PHP program helps you calculate numbers in the Fibonacci sequence.

While Loops

Wednesday May 28, 2014

One of the types of loops in PHP is a while loop.  This loop will continue to repeat as long as (while) a certain condition is true.  Once the condition becomes false, the loop will end.  [read more]

Unique ID

Wednesday May 21, 2014

There is a function in PHP that you can use to generate unique IDs.  It is the Uniqid () function.  You can choose to add a prefix to what is generated as well.  [read more]

A week before Easter

Tuesday May 20, 2014

I was recently asked on Twitter how a person would calculate a week before Easter.  It's actually very simple, you just have to do a little bit of timestamp math, and date formatting.  Read how to do it here.

Time

Wednesday May 14, 2014

You can generate a time stamp in PHP using time ().  This will return a number that represents the amount of seconds that have passed since January 1, 1970 at midnight GMT.  You can then format this number in different ways for your needs.  [read more]

Finding Tangent

Thursday May 8, 2014

In PHP you can find the tangent of an angle using the tan () function.  It expects your input to be in radians.  For example tan (M_PI_2).  [read more]

Switch

Tuesday May 6, 2014

In PHP you can use a switch loop to help a computer decided between several different choices.  A switch loop uses the switch () function, and can have as many cases as you need.  [read more]

Str_replace() for strings

Thursday April 24, 2014

You can use the str_replace () PHP function to search and replace within a string.  Here is an example of how you would use it to strip out vowels:

$vowels = array("a", "e", "i", "o", "u");
$no = str_replace($vowels, "", "My name is Joe Smith");
Print $no; 

Technical Interview Tips

Wednesday April 23, 2014

Do you have a job interview coming up for a technical position, as a PHP programmer?  Or are you interested in having one in the future?  Have a look at these technical interview tips.

Copyleft Software

Wednesday April 23, 2014

Copyleft software is a form of open source software that requires all future deviations of the work be released under the same license.  So, if you release it for free you can ensure that all future versions of it are also free.  Read More.

©2014 About.com. All rights reserved.