Get first key, last key, first value and last value in Array
Associative arrays are great, and they work perfectly when working with foreach. But what do you do if you just want the first key in the array or the last value?
Associative arrays are great, and they work perfectly when working with foreach. But what do you do if you just want the first key in the array or the last value?
A couple of years ago we published a short article with some tips on good string functions. Didn’t think it would be that appreciated, but lots of people has emailed us and thanked us for the examples and ideas on how to use the functions. So here we go again, a new function to explain: [...]
For a long time this site has been running on a custom written script. It has worked well, but one month ago we decided to migrate to wordpress. Here is our experience and tips for others thinking of making the change.
There are many ways to create programming code. One of the easiest but most powerful is to start using object oriented way to think and work. I will give you the basic how you create a class, and why.
Excel files are great for many things. It might though be a little bit tricky to generate them on the fly with php. Therefor I will guide you exactly how to do it, quick and simple.
Working with strings is done very often for the web, and PHP is probably one of the best programming languages for manipulating strings I guarante that there are a function or combination of string functions for Anything you ever need.
Create a copy of an image as a thumbnail. You get a great function that use the GD library to create the new thumbnail file.
Often you need to change the size/dimensions of images in your web site.
GD is a package for manipulating images with PHP. Often it is installed, but not always. This script shows you all possible information about your GD configuration.
Do you know how many visitors you get to your site every day, and where they come from? Why not log it your self with this pretty simple technique and save the statistics to a plain file of the web server.