Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 130 131 132 133 134 ... 147
This is a simple little block that displays a list of terms in a vocabulary as a list of links to /taxonomy/term/tid pages. Items are listed in the order set for the vocabulary. You could probably use the php sort() function to change that if desired...
0 1715 posted 17 years ago by aleprieto
Fairly simple way to match sidebar content with the main content for several pages without the need to create multiple blocks or the hassle of putting content in a block. For example, your Home, About and Contact pages all have a sidebar with some...
1 1552 posted 17 years ago by aleprieto
This code snippet make use of the API to accomplish a block with links to related content.
1 1474 posted 17 years ago by aleprieto
Replace all mysql_query() calls in your project to debug_mysql_query() to see all mysql queries in Firebug console.
1 1402 posted 17 years ago by stancell
3 1222 posted 17 years ago by antpaw
0 1011 posted 17 years ago by LondonWeb
Simplified form to extract data through MySQL
0 920 posted 17 years ago by LondonWeb
1 904 posted 17 years ago by LondonWeb
14 2383 posted 17 years ago by iTony
If you have a title, for something like a blog or product, and want to make an seo-friendly name to call it, here is a function. SAMPLE INPUT: $title = "This foo's bar is rockin' cool!"; echo make_seo_name($title); //RETURNS: //this-foos-bar-i...
10 3012 posted 17 years ago by jdstraughan
PHP Template override by Benjamin Melançon of Agaric Design.
3 1710 posted 17 years ago by shrop
3 1357 posted 17 years ago by benphelps
2 1241 posted 17 years ago by benphelps
3 1387 posted 17 years ago by benphelps
3 1506 posted 17 years ago by benphelps
Starting from here: http://snipplr.com/view/2534/update-copyright-date-in-php/ I made one that is a little more sussinct (sp?)
0 859 posted 17 years ago by SeanJA
2 1200 posted 17 years ago by iTony
Drupal helper function to debug a table. Returns the contents and some explanation of a database table in a rendered format (HTML table). **NOTE** You REALLY do not want to put this function behind any kind of menu_callback and/or on other pages....
1 2044 posted 17 years ago by berkes
For when I catch a bad case of stupid and forget how to write simple php and I need to put the training wheels back on. Drop this in before the closing body tag on a php page to see a list some of what is happening when the page loads.
0 893 posted 17 years ago by inkdeep
When you run this script you will see the result like this Image width 379 Image height 344 Image type 2 Image attribute width="379" height="344" You will get the width, height, type of an image and also attribute of an image, I use this fun...
3 4497 posted 17 years ago by jamesming
uri: http://organic.qualitywordpress.com/
0 1003 posted 17 years ago by ChaosKaizer
Magic Quotes is a great feature of PHP but sometimes it can just get annoying. It's simple enough to turn it off at the .ini and restart apache but here's a quick .htaccess workaround
2 1444 posted 17 years ago by aristoworks
This is a simple example of how to read and write XML that includes reading attributes and nodes.
1 1240 posted 17 years ago by donkeykong
1 ... 130 131 132 133 134 ... 147