Home » Posts tagged with "php"
Setting up PHP with IIS on a Windows OS has never been so easy. The PHP Manager for IIS makes it really to easily install, configure, manage and troubleshoot one or many PHP versions on the same IIS server. So if you are looking to setup PHP on your Windows 7 machine with IIS 7, follow the below steps.
I. Enable IIS on your machine:
In Start Menu,...
I know it doesn’t sound good to talk bad here specially when you are writing an article after a long while. We have changed our website theme so it looks simple and loads pretty fast and we are back in to our business of giving things free and expecting nothing back . We don’t ask you to sign-up, we don’t ask you to click or read...
You want to compare two arrays in PHP. Basically what you need is to make sure that both the arrays contain the same set of values may or may not be in the same order. You can use the built-in PHP function, array_diff to compute the difference of arrays. But this function just checks whether all the values of array1 is in array2 and if not returns the...
Filed in: PHP/MySQL, Programming Techniques
WordPress, by default shows a number of Widget Boxes in it’s admin homepage a.k.a the dashboard. These boxes are called Meta Boxes and shows Incoming Links, Plugins Feed, WordPress.org News and other WordPress news. Since WordPress 3.1, the Network features are managed through a Network Admin Dashboard accessible to the Super Admins. This Network...
We call it Short Circuit Evaluation (also known as minimal evaluation, or McCarthy evaluation) when a programming language DOES NOT evaluate/execute the second operand in a condition. if the first operand alone can fully determine the outcome of that condition.
We have been using this concept in our codes always. All PHP guys must be familiar with this...
Being a flash programmer, I have always had this concern. The way a flash application works differs from a php application. We don’t really need to worry about protecting the PHP code because the code is interpreted in the server and only the html codes are sent to the client browser. But a Flash engine basically lies in the user browser and the AS2...
I have an array with many values and I need to do a search to find all the values that match a pattern. We have functions like in_array & array_search in PHP, but these functions basically try to match the exact needle value in the array. I need to use my Regular Expression Pattern and find all the array values that match the regex pattern.
The...
In this tutorial, learn about the get_browser() PHP function and its configuration. We’ll learn how to use Gary Keith’s browser information database (browscap.ini) with the PHP browscap directive.
I wanted one of my web applications to have a different appearance on mobile phones and devices. I didn’t really want to set up an entirely...
Often we search for records in a database table for fetching records that were created or modified on a particular date or between two dates. We match against a date field and add multiple conditions to find records with a date field value ranging between two dates.
It would look something like this:
Select * from tables where CREATE_TIME >= "2007-03-14...
When we need to swap the values of two variables, we use a third variable temporarily to hold the data between swapping. Something like this:
<?php
$tmp = $a;
$a = $b;
$b = $tmp;
?>
Here is another way without using a temp or a third variable.
<?php
list($b, $a) = array($a, $b);
?>
And if you want to make it a function:
<?php
function...
Filed in: PHP/MySQL, Programming Techniques


