Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 124 125 126 127 128 ... 147
# Export MySQL Data as CSV This code takes a `mysql_query()` resource and outputs its rows into CSV spreadsheet format. Edit the `header('Content-Disposition...` declaration to tell the user's browser to either display the data as plain text or do...
6 1015 posted 15 years ago by mikegreen
// FUNCION BY Ahmet Alp Balkan // http://www.ahmetalpbalkan.com
2 926 posted 15 years ago by prf_q
9 782 posted 15 years ago by shahways
Simple PHP tutorial on how to use isset.
0 1412 posted 15 years ago by 1man
0 811 posted 15 years ago by endorfin
0 885 posted 15 years ago by sveggiani
This is for a particular search on a project. Just saving here for future use.
0 641 posted 15 years ago by joeymarchy
1 822 posted 15 years ago by iTony
Better way to echo a .current_page_item class on a list nav.
3 781 posted 15 years ago by davebowker
2 1093 posted 15 years ago by iloveitaly
Well, not the best one...
1 810 posted 15 years ago by Sn0opy
Checks for a valid email address using the php-email-address-validation class. Source and docs = URL
0 752 posted 15 years ago by fruehjahr
2 785 posted 15 years ago by fruehjahr
Forces a user to download a file, for e.g you have an image but you want the user to download it instead of displaying it in his browser.
0 745 posted 15 years ago by fruehjahr
1 573 posted 15 years ago by fruehjahr
3 876 posted 15 years ago by fruehjahr
I think this is php 5 only
0 725 posted 15 years ago by jfherring
Based on Jdub7's Pure PHP Template function http://snipplr.com/view/10797/pure-php-template-function/
2 748 posted 15 years ago by thermosilla
Return just the Apache version number of your server, and operating system, from $_SERVER['SERVER_SOFTWARE'] Example: print ('Apache Version: ' . apacheversion()); will return something along the lines of... "Apache Version: 2.2.10 (Unix...
1 1754 posted 15 years ago by iridium
Simple but useful function for getting a single piece of data from a database and placing it straight into a variable. Example: $variable = one_result("SELECT columnOne FROM table WHERE columnTwo=whatever"); This would insert the value of colu...
1 621 posted 15 years ago by iridium
Usage: define('PIRATE',bindec('0001')); // 1 define('NINJA',bindec('0010')); // 2 define('JEDI',bindec('0100')); // 4 define('ADMIN',bindec('1000')); // 8 $rpermit = array(PIRATE,JEDI); // Equivilent Flags '0101'...
0 497 posted 15 years ago by Jdub7
2 733 posted 15 years ago by Jdub7
Wordpress function
1 901 posted 15 years ago by Tate
1 ... 124 125 126 127 128 ... 147