PHP

FTP upload with PHP

In this tutorial I will demonstrate how to perform FTP uploads using PHP. Read more…


PHP Memory Usage

In this tutorial I will demonstrate how to find the amount of memory a PHP script is using, and how to free resources used by MySQL objects. Read more…


How to count files in folder with PHP- Linux file count

I’ve heard of issues where a large number of iNodes (files) were causing problems on servers, blocking file read and write access among other things. The first question in this situation is where the files are. Chances are there are a lot of files piled up somewhere, that you don’t need. On Linux you can run file counts various ways from command line. I came up with my own solution using PHP. Read more…


Force no caching with PHP

If you’re a web developer you’ve almost certainly run into web page caching issues. Allow me to explain one situation I found myself in and how I fixed it. Read more…


PHP Decode & Encode

In this article I will talk about PHP decoding and encoding. Read more…


How to “echo” an array in PHP

The PHP echo() function is great for spitting out your basic types of values, such as strings and numbers. But if you want to see the values, or even better the data structure, of an array you will need to use a different method. This is where print_r() comes in handy. Read more…


Syntax Error PHP Parse

PHP syntax errors are easy to make, and if unchecked can popup from the rarely used corners of a complicated application. If you short on time finding a debugger of some sort, don’t want to mess with installing software on the server, or just plain lazy, try this out at the command line Read more…


Adding an element to the beginning of an array in PHP

// Create an array
$a = new array("apple", "orange");
 
// Prepend an element to the array
array_unshift($a, "raspberry");
 
// Prepend a couple more elements to the array
array_unshift($a, "pineapple", "watermelon");

The PHP add to array function: array_push()

There are two ways to add an element to the end of an array in PHP. Read more…


Next Page »