HOT CSS

Free Beautiful Css templates, Web designer tricks from expert

Pages

▼
Wednesday, March 5, 2014

Tutorial Variable Variables

›
<?php $var1 = 'nameOfVariable'; $nameOfVariable = 'This is the value I want!'; echo $$var1; ?> ...

Tutorial URL Validation

›
$url = 'http://example.com'; $validation = filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED); if ( $validation ) ...

Tutorial Update Values of Entire Table

›
This code assumes you are connected to a MySQL database which has a table with Names and Emails. The idea is that it will output a table of ...

Tutorial Unzip Files

›
<?php $zip = zip_open("zip.zip"); if (is_resource($zip)) { while ($zip_entry = zip_read($zip)) { $fp = fopen("zi...

Tutorial Truncate String by Words

›
Technique #1 <?php function trunc($phrase, $max_words) { $phrase_array = explode(' ',$phrase); if(count($phrase_array) ...

Tutorial Truncate Long String Exactly In Middle

›
This will truncate a longer string to a smaller string of specified length (e.g. the "25" value in the code below) while replacing...

Tutorial Time Ago Function

›
This can be used for comments and other from of communication to tell the time ago instead of the exact time which might not be correct to s...
‹
›
Home
View web version
Powered by Blogger.