It is very easy to count DOM-Elements within a HTML-file by using jquery. Here is a little example:
Do you need to find out in PHP, when a file was modified? Then you should take a look at the PHP-function filemtime. This function expects a filename as parameter and returns the modification-time of this file. Here is an Continue reading PHP: Detect Time Of Last Modification Of A File
Normally a HTML-list is displayed vertically, which means that each entry is below the previous entry. But for some reasons you might want to display the list vertically, e.g. for a menubar. Here is a simple way to do that. Continue reading Display A HTML-List Horizontally
In this article I’ll show you, how to output each element of an an assciative array in PHP. First of all, we need an associative array. In this example I’ll use an array with colors as the key and the Continue reading PHP: Output An Associative Array
In PHP it’s easy to work with arrays. Just declare someting like this: <?php $arrX = array("Kay", "Joe","Susan", "Frank"); ?><?php $arrX = array("Kay", "Joe","Susan", "Frank"); ?> Now you can access the values with their index (which starts a 0 for Continue reading PHP: Get A Random Item From An Array
In a JSF Page you might want to display all entries of a collection as a comma-separated list (or of course another separator). To do that you can use the JSF <ui:repeat></ui:repeat> Tag.
If you want to insert a character like & e.g. within a JSF (Java Server Faces) component’s value attribute, you might get an error. To avoid this you must insert a HTML-Entity for the character. Here is a short list Continue reading How to insert special characters like &, < and > into a JSF component