Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
use this function to insert a string into another string at a certain position.<br>
echo insertString("legendary", " wait for it ... ", 5);<br>
legen wait for it ... dary
0
831
posted 15 years ago by jlvallelonga
Simple PHP script which allows you to specify your twitter log in details and a search term, then automatically follow users who have tweeted that term. Code is released as Open Source, use it as you wish - please leave my URL in the commented sectio...
3
1969
posted 15 years ago by shakefon
This is my first encounter with FirePHP, I might be using this more often. FirePHP lets you output log lines like console.log would in FireBug. You will need the FirePhp plug-in for Firefox and you will have to upload the FirePHP lib to your server.
2
821
posted 15 years ago by rbroen
Quick little function to give you a select box for numbers ranging from min to max. Perfect for birthday date selectors.
0
789
posted 15 years ago by brownrl
This function goes in the {module\_name}.views\_default.inc file
0
688
posted 15 years ago by jonathanpglick
This will trigger views to load the views in the file {module\_name}.views\_default.inc
0
663
posted 15 years ago by jonathanpglick
check out why the get_include_path() was appended to the new path.
0
902
posted 15 years ago by iTony
Here is a small function that I use to update records in a database.
It coincides with the insertFromPost function that I have posted earlier.
The element names in the form need to have the same name as in the DB and the field names should all...
1
979
posted 15 years ago by brownrl
This snippet will create an array of all images in a directory and sub-directories and display them randomly.
4
3733
posted 15 years ago by superuntitled
Drupal FiveStar change any of the settings as necessary to create a completely customized widget, regardless of the node type settings.
1
876
posted 15 years ago by humanoid
Manipulates XML nodes using PHP's Dom library. Includes XPath navigation, child manipulation, and deletion of current document.
0
868
posted 15 years ago by mikeevans
Returns only the directory path to the current file — no host or filename, just URI directory structure.
1
860
posted 15 years ago by radarseven
Include file that contains the array of areacodes and states. **This file is needed for the Areacode Script to work. Script here: http://snipplr.com/view/17339/area-code-lookup-script/
2
821
posted 15 years ago by arnoldb
This simple script will return what state an areacode belongs to. Be sure to get the include file that contains the array here: http://snipplr.com/view/17340/area-code-lookup-script--include-file/
1
933
posted 15 years ago by arnoldb
returns URL that's an I'm feeling lucky search on wikipedia. Handy when paired with a database of names of things.
2
812
posted 15 years ago by mocha0range