How to remove elements from an array in PHP

// Create an array
$a = new array("orange", "apple", "pineapple");
// Remove the apple from the middle of the array
// Create an associative array
$a = new array("dogs" => 4, "cats" => 9, "birds" =>2);
// Remove the birds from the array

An XPath quick reference

This is a very brief quick reference for those of you who know what XPath is, but don’t use it often enough to have it ingrained in your heads, like myself. Read more…

Another method for checking whether a URL exists

In a previous article we demonstrated a simple method for discovering whether or not a URL exists. The following code accomplishes the same thing, but offers a little more control. Read more…

How to send mail in PHP

This functionality is one of the most needed in PHP web applications out there. You may want send a reminder to an employee about a meeting, or you might want to send an email from PHP to a user who has forgotten their password. There is a function called mail built into PHP that is quite powerful. Read more…

Checking whether a URL exists in PHP

There is no built in function to check if a particular URL exists, but you can easily write one. The following is a simple method, or you can try this one which takes more code, but allows more control. Read more…

Working with session variables in PHP

Let’s say you are creating a website where users need to login. How do you track a user’s id from page to page, or even verify that a user is logged in when they should be? You can use the global $_SESSION variable! Read more…

Ajax and PHP

AJAX in a word… SWEET! I love it. AJAX stands for Asynchronous JavaScript and XML. Basically it allows your web page to load content AFTER the web page has already loaded. Read more…

Solving the “break-out” issue in iFrame Facebook applications

I’ve tinkered with Facebook apps enough to find out what works and what doesn’t. The most frustrating things I’ve had to deal with is when I’ve developed a Facebook app in an iframe. Using the canvas page rather than an iframe is great. You’ll encounter little to no weirdness. But if you’re like me, you want full control over your app, and that’s accomplished by going the iframe route. Read more…

The SimpleImage Class

In a previous tutorial we learned how to upload an image using HTML and PHP. Now we will talk some about the image functions built into PHP, specifically how they can be used to resize and save images. Read more…

« Previous PageNext Page »