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 2677 posted 17 years ago by mikegreen
// FUNCION BY Ahmet Alp Balkan // http://www.ahmetalpbalkan.com
2 2422 posted 17 years ago by prf_q
9 2907 posted 17 years ago by shahways
Simple PHP tutorial on how to use isset.
0 2692 posted 17 years ago by 1man
2 1981 posted 17 years ago by jtkendall
0 2012 posted 17 years ago by endorfin
0 2072 posted 17 years ago by sveggiani
This is for a particular search on a project. Just saving here for future use.
0 1390 posted 17 years ago by joeymarchy
1 1969 posted 17 years ago by iTony
Better way to echo a .current_page_item class on a list nav.
3 1983 posted 17 years ago by davebowker
Put this in settings.php
2 2350 posted 17 years ago by aleprieto
2 2566 posted 17 years ago by iloveitaly
Well, not the best one...
1 1965 posted 17 years ago by Sn0opy
Checks for a valid email address using the php-email-address-validation class. Source and docs = URL
0 1805 posted 17 years ago by fruehjahr
2 2008 posted 17 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 1864 posted 17 years ago by fruehjahr
1 1488 posted 17 years ago by fruehjahr
3 2478 posted 17 years ago by fruehjahr
I think this is php 5 only
0 1734 posted 17 years ago by jfherring
Based on Jdub7's Pure PHP Template function http://snipplr.com/view/10797/pure-php-template-function/
2 1776 posted 17 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 3312 posted 17 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 1610 posted 17 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 1450 posted 17 years ago by Jdub7
2 1899 posted 17 years ago by Jdub7
Wordpress function
1 2050 posted 17 years ago by Tate
1 ... 124 125 126 127 128 ... 147