Programming

PHP JSON: An Example Javascript JSON Client With PHP Server

PHP JSON: An Example Javascript JSON Client With PHP Server

While JSON has many uses, probably the most common use is to pass data structures to Javascript. JSON is simply a standard format for data structures. In this example we’ll use a PHP page as a JSON server; we’ll use an HTML page with embedded javascript to contact the server, retrieve…

Category : Programming   11-04-2013   by admin admin

Six Useful PHP code snippets

Six Useful PHP code snippets

Here’s a mini list of  useful PHP code snippets that we find using on a weekly basis. You could use these as is or expand them as part of other applications or add them to a php class.   Adjust server time Useful if you have a server in a different timezone, like…

Category : Programming   11-04-2013   by admin admin

Learning Loops in Php: FOR

Learning Loops in Php: FOR

Loops come in several different flavors in PHP: for, while, do-while, and foreach. We will introduce you to each of them in 3 lessons and we will show you how they can making repetitive tasks straightforward and easy to maintain.   Lesson #1: The for Loop  The syntax of a for loop is: for (expr1; expr2; expr3) statement The first expression (expr1) is evaluated…

Category : Programming   11-04-2013   by admin admin

A More Efficient Embedding Method for YouTube Videos

A More Efficient Embedding Method for YouTube Videos

When you embed any YouTube video on a website using standard IFRAME tags, you’ll be surprised to know how many extra pounds that video adds to your page. The web page has to download additional ~400 kB of resources (CSS, JavaSript and Image files) for rendering the video player alone and…

Category : Programming   11-04-2013   by admin admin