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 923 posted 15 years ago by prf_q
9 781 posted 15 years ago by shahways
Simple PHP tutorial on how to use isset.
0 1412 posted 15 years ago by 1man
0 808 posted 15 years ago by endorfin
0 882 posted 15 years ago by sveggiani
This is for a particular search on a project. Just saving here for future use.
0 640 posted 15 years ago by joeymarchy
1 821 posted 15 years ago by iTony
Better way to echo a .current_page_item class on a list nav.
3 780 posted 15 years ago by davebowker
2 1090 posted 15 years ago by iloveitaly
Well, not the best one...
1 809 posted 15 years ago by Sn0opy
Checks for a valid email address using the php-email-address-validation class. Source and docs = URL
0 750 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 744 posted 15 years ago by fruehjahr
1 570 posted 15 years ago by fruehjahr
3 875 posted 15 years ago by fruehjahr
I think this is php 5 only
0 724 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 1753 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 619 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 495 posted 15 years ago by Jdub7
2 733 posted 15 years ago by Jdub7
Wordpress function
1 899 posted 15 years ago by Tate
1 ... 124 125 126 127 128 ... 147