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
array_column can do much more than extracting a single column. Here is what you can do with array_column in PHP
Often we need to remove empty elements from our array. For example when we split a string with space, we can get the words and also blank strings when there are two or more spaces put together.
We can use array_filter function for rescue. When we call array_filter with out passing the filter function it […]
I’m in the process of creating Usage examples for the brand new version of RESTler. Take a look at the work in progress version here (I would love to hear your thoughts). One of the nice features in that is the ability to see the source code.
I’m using a getsource.php which will return the […]
List component does not have a default icon. Easy way to add one is to add a Icon function which is very similar to the one we use with Flash v2 components. Only difference is instead of string we need to return a class reference to the image
Now we can point […]
Utilizing the available application space effectively is one of the important things we need to consider when designing an user interface. Olden search interfaces had two parts text input field and a search button. Then the “search”/”find”/”go” text is replaced with a lens icon. Now a days this lens icon […]
Last time we saw the problem with sending ActionScipt 3 Associative Array. Now we let us see where associative arrays can help.
Lets Make an Array with offset index in PHP:
$arr =array(5=>5);
in ActionScript:
var arr:Array= [];
arr[5]=5;
Sending these arrays either way they go with the missing indices filled with null, so the PHP array comes to flash […]
Here is the sample code to shuffle the contents of an array
When we are including an AS1 file in an Fla which has to be published as AS2, we need to be careful in naming the include file. There shouldn’t be any object initialized in _global which has the same name as the include file.
Say for example,
I had a include file called […]
When testing my application in IDE, I wanted to use some hard coded test data instead of Every time loading the dynamic data. System.capabilities.isDebugger is the boolean property which is true when we are testing in IDE or special Debug Player.
Here is the sample code that I’ve used
Cache is a place to store something more or less temporarily. Web pages we’ve visited are stored in our browser’s cache directory on our hard disk. Likewise, ISPs and Web Servers cache web pages which speeds up access times for users, as the page is being read from the cache memory […]
Recent Comments