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 1016 posted 15 years ago by mikegreen
// FUNCION BY Ahmet Alp Balkan // http://www.ahmetalpbalkan.com
2 927 posted 15 years ago by prf_q
9 783 posted 15 years ago by shahways
Simple PHP tutorial on how to use isset.
0 1414 posted 15 years ago by 1man
0 812 posted 15 years ago by endorfin
0 889 posted 15 years ago by sveggiani
This is for a particular search on a project. Just saving here for future use.
0 642 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 783 posted 15 years ago by davebowker
2 1097 posted 15 years ago by iloveitaly
Well, not the best one...
1 813 posted 15 years ago by Sn0opy
Checks for a valid email address using the php-email-address-validation class. Source and docs = URL
0 754 posted 15 years ago by fruehjahr
2 787 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 877 posted 15 years ago by fruehjahr
I think this is php 5 only
0 726 posted 15 years ago by jfherring
Based on Jdub7's Pure PHP Template function http://snipplr.com/view/10797/pure-php-template-function/
2 749 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 1756 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 735 posted 15 years ago by Jdub7
Wordpress function
1 901 posted 15 years ago by Tate
1 ... 124 125 126 127 128 ... 147