Tips.PHP: A hidden gem in array_column

array_column can do much more than extracting a single column. Here is what you can do with array_column in PHP

By |September 10th, 2019|Blog, Code, Examples, PHP, Tips|0 Comments

Webcam Motion Detection using AS3 – Source Released.

I rewrote the webcam motion detection example in Actionscript3 using Flash 9 Alpha. You can see the demo here.

As I promised earlier the FLA is ready for download here 🙂

By |July 17th, 2006|Blog, Code, Flash 9|0 Comments

Removing Byte Order Mark (BOM) from the given string.

Since PHP does not recognize and ignore BOM in the loaded files, I wrote the following script to find and remove the BOM from the loaded string.

By |July 3rd, 2006|Blog, Code, PHP|0 Comments

Solution for using relative paths in swfs to load data.

Only starting from Flash 9 and Actionscript 3 we can reliably use relative path to load data. Let me explain the problem.

say for example we have an swf file named ‘Slide.swf’ in a folder ‘Slide001’ folder which loads ‘data.xml’ using the following statement

This works fine when we directly call the swf, or the […]

By |June 29th, 2006|Blog, Code, Flash MX|0 Comments

Counting number of words in a String.

Here is a simple code to get the word count. To ease up the process, I do not count the words that are not separated by space
For Example “Mr.Arul” will still be counted as one word. but it makes sure whitespace is not counted as words
Here is the code

By |June 14th, 2006|Blog, Code, Flash MX|0 Comments

String.isWhite and String.getWordCount().

This is the same word count function that I showed in the previous post presented in the good old way of adding more properties and methods through the prototype.

String object is extened to have isWhite read only property and getWordCount method.

By |June 14th, 2006|Blog, Code, Flash MX|0 Comments

XML Shortcuts component released.

The XMLShortcuts component enables shortcut access to All XML nodes.

Biggest advantage of using XML shortcuts is it can be easily added to existing projects with out any modification. Simply drag and drop the component from components window to the stage and then delete it from stage (let it stay in the […]

By |June 15th, 2005|Blog, Code, Flash MX|0 Comments

PriorityQueue Class

Brandan Hall wrote the PriorityQueue (pQueue) class in “Object Oriented Programming with ActionScript” published by New Riders. I’ve converted that class to ActionScript 2 which you may download from here.

By |July 21st, 2004|Blog, Code, Flash MX|0 Comments

Actionscript for XML pretty printing and color highlighting . XMLHighlighter class

XMLHighlighter class

Flash Player 6 (copy the XMLHighlighter class actionscript file to the same folder as the FLA or to the class path).


Use the methods and properties of the XMLHighlighter class to generate the html code to generate color highlighted pretty printed XML

Method summary for the XMLHighlighter class


Returns the HTML highlighted code for the […]

By |July 19th, 2004|Blog, Code, Flash MX|0 Comments

Converting Date Strings back to Date.

We all know that trace(new Date()) traces the date as a string that looks like “Mon Jul 12 13:20:09 GMT+0800 2004”

How to convert this String back to Date? There is no built in method, so I’ve written this function to do that.


You may download the ‘’ from here

By |July 12th, 2004|Blog, Code, Flash MX|0 Comments