Miscellaneous
Results 1 - 20 of 158
Dynamic CSS with PHP
Need to generate style sheets dynamically with PHP to keep presentaion logic together or create environment aware style sheets with PHP and JavaScript? This tutorial shows you how!
Examples of the preg_match function
The preg_match function of Php is often used and the online script here includes few examples which can be implemented in any code. There is an online demo. The code will be updated regularly. - just added a preg_match_all example
PHP validation and verification
This is one the trickiest parts of any application at all. Why is that? Because the developer doesn't control it. You can write the best algorithm in the world, but still if it includes user input there is a place for mistakes. Even if we put some...
(show more)
Creating a BBCode Parser
Have you ever wanted to implement BBCode, the special formatting codes used by forums, into your own PHP scripts? Well, it's actually pretty easy to accomplish using some simple regular expressions and the preg_replace PHP function. This mini-tutorial...
(show more)
PHP Redirect Tutorial
This tutorial will demonstrate how to use PHP to perform a redirect. The PHP header function will be used to send the HTTP headers required to perform the redirect.
How to Count all elements in an array
PHP Count function can count all elements in an array, or properties in an object. Counting an array gives us array kength which is umber of elements it contains.
Use mod_rewrite to create subdomains like URLs
You might have noticed some sites having their URLs written as if they were different subdomains of the same domain. You can do this without creating the actual subdomains, using Apache mod_rewrite. Read this tutorial to learn how!
PHP Array Tutorial
This tutorial will demonstrate how to use arrays in PHP, with code examples of all fundamental array operations.
Add suffix to a number
Add st, nd, rd and th suffix to numbers dynamically
Limit Characters From Text
This php script helps you limit displaying characters form you message.
JavaScript Object Constructor
Object oriented programming (OOP) is often preferred by developers who wanted to push the boundaries in the client side application. If the requirements are placed in the client side like strong internet connection and browser compatibility, developers...
(show more)
Random image from folder with PHP
If you need to put a random banner up or just a random image on your homepage/subpage then this little piece of code is for you! It will grab an image from the folder you specify and show it on the page. Every pagerefresh will make it pick another.
The real world datagrid the OOP way
Tutorial about implementation of real world datagrid component using the techniques of object oriented programming and MVC design pattern.
Observer pattern in PHP
Observer pattern is one of the most powerful design patterns. Whole application can be build based on it. This tutorial demonstrates its possibilities.
List images in a folder with php
After i needed something like this for myself i decided to make a page of rit so that other people who need it can use it too. This little code will basicly list every image in a folder using php. You can alter it in every way you can/want.
A quick tutorial in .htaccess
Apache's .htaccess allows a wide range of useful web server behaviours to be implemented, the most popular of which are provision of custom error pages, and password protection of directories. This tutorial gives a brief lesson in how to implement these...
(show more)
Count files in a folder with php
If you need to count files in a folder using PHP then this little piece of php is just for you. Easy to add and change.
PHP function for Basic Image Gallery
This PHP function is a very basic one, yet useful for a single page image gallery within a small website. It reads all the images from given folder and creates a simple looking gallery with given sized thumbnails.
str_ireplace () in PHP4
This function is an alternative to str_ireplace() function in php5. It is useful when you need to call str_ireplace() function but you have php4 installed in your server. Put this function stri_replace() as a custom function in your code and do the same...
(show more)
Search Engine Friendly URLs with PHP
You know that search engines love pretty URLs that have a lot of keywords. Pretty URLs like that are easy for us to read. It will also make your site ranks high in the search results of a search engine. This article covered a simple trick to achieve...
(show more)
