Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged class
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I created this code for practice, and I looking for better and clear solution for the last instance where I can write or delete the data, but after I want to get back the content as array or the key as string. I want to use this write-read back with...
0
994
posted 10 years ago by gitarfogas
This is a Class that allows you create a letter with correct headers and send it to multi-emails.
0
895
posted 11 years ago by Zayac
This is a static session wrapper that handles single variables and arrays. It allows setting, resetting, and deleting session variables (without destroying the session). It regenerates the session id every time a session is started to prevent sessi...
0
913
posted 11 years ago by halk
https://gist.github.com/4098493
(examples of use below the class code)
This class allows you to load a file of snippets that are really mini-templates copy them from your repository fill the token slots in them the with your data and render them as...
0
1000
posted 12 years ago by halk
A function to upload an image to the media library and set it as featured image of a post. It requires 2 params. The name of the upload field and of course the post ID.
This function is part of the WPelements library class available on Github. Fee...
0
1187
posted 12 years ago by krike
Class that convert arrays to csv format, downloads CSV files and saves to disk on server.
0
1036
posted 12 years ago by TimoZachi
At line 220 you should see the the start if an if block. This is the section that needs to be edited. I added the foreach block to itterate over the data array and create links in the table cells.
0
894
posted 12 years ago by jdhall75
Abstract class from which other classes can be derived to handle database access and data retrieval.
Constants for database connection (DB_DSN, DB_USERNAME, etc.) must be set in another php file (eg. config.php)
1
920
posted 12 years ago by osccar
A class i started to implement, which ended up in a working concept
However I'm not sure if it's a legal way of programming since I unnessesery
changes the structure of php without some real value except nicer structure
For now it remain a conce...
0
878
posted 12 years ago by Knarf
Very simple to use Web Poll Class, simply create a new instance, set the question and set the answers. You still have to set up your database yourself
1
812
posted 12 years ago by RobertHegeraad
Simple class to retrieve an ID using a URL of the Youtube
0
1171
posted 12 years ago by leandroperes
This is a custom class for caching results through php's session. The class can be used to cache anything, but i use it to cache mysql results so i don't have to get all the time the results by querying MySQL (wich may take a long time, especialy if...
0
1176
posted 13 years ago by TimoZachi
Could possibly be simplified to maximise efficiency. It relies on a separare WP Sleek framework function sleek_get_theme_menu_name. This could ideally be improved to allow the theme location to passed as a parameter somehow.
0
1165
posted 13 years ago by Huskie