Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 30 31 32 33 34 ... 58
This is what I wanted:\r\nI had a structure like this:\r\n-Artist\r\n --Peter Miller\r\n ---Pictures\r\n ---Press\r\n ---Videos\r\n\r\nand wanted to have the sub-sub-Menu when located on the \"Peter Miller\"-Page. \r\nSo that on \"Peter...
0 1029 posted 15 years ago by zartgesotten
A simple wrapper class for MySql around PDO. Also an example on how to use this wrapper for SQLite.
1 951 posted 15 years ago by Knarf
This is the PHP code to debug any variable ..
1 1082 posted 15 years ago by xkeshav
0 1104 posted 15 years ago by DesignByWilliam
If you want to get all the TV from a specific document
1 1552 posted 15 years ago by thiswayup
0 963 posted 15 years ago by lolindirfaelivrin
Working on creating a 'days ago' script. I know some already exist, but I just want to know how to do it myself. I'm also incorporating leap year functionality and some utility functions that could be used on other projects.
2 1840 posted 15 years ago by alvincrespo
Originally written by Jason Lengstorf, rewritten by Drew Douglass, packaged into the EnnuiCMS (link above), can be used as standalone class. Be sure to change or define your constants for PAGE_OBJ_WIDTH and PAGE_OBJ_HEIGHT when using the YouTube m...
1 1116 posted 15 years ago by DrewDouglass
Substitute new_ placeholder in the second line with your new prefix. Run it: http://www.yoursite.com/rename.php and wait until it responds with an OK, usually after a couple of seconds. Delete the rename.php script. Edit the configuration.php file...
0 1632 posted 15 years ago by beneberle
I\'ve added an additional case to handle videos linked from a user\'s channel.
2 1772 posted 15 years ago by Jamie
This code adds the specified library to the header in WordPress unless you are in the admin section.
2 1109 posted 15 years ago by jonkemp
1 732 posted 15 years ago by neillh
2 1019 posted 15 years ago by stuntsnippets
When retrieving table rows with PHP and prepared statements, you must use a method called bind_result() and pass in a variable name for each column that is being returned from the database. For example, if you are selecting three columns (say, id, ti...
3 1660 posted 15 years ago by Nettuts
The current time, converted from UNIX timestamp to use in MySQL DATETIME
0 1420 posted 15 years ago by koko
<img>
1 1293 posted 15 years ago by stuntsnippets
Simple piece of PHP to get the contents of a specified tag from an XML file and return it
3 2511 posted 15 years ago by ollie101
Send SMS via www.smsmatrix.com SMS Gateway using PHP See more examples at <A HREF="http:/www.smsmatrix.com">SMS/Voice/TTS Gateway</a>
0 1114 posted 15 years ago by smsmatrix
I used to program in classic ASP and would sometimes check if a certain word or letter would be in a string with instr. if instr(haystack, needle)>0 then DO SOMETHING end if If the needle starts on the first position of the haystack, instr...
0 1128 posted 15 years ago by seloh77
Here's a handy (relatively undocumented) tip. PHP supports the following method of assigning strings (borrowed from Perl)
0 904 posted 15 years ago by Snaver
Save the source provided to /app/view/helpers/timezone_select.php To use the below helper, just put this code into your view: echo $timezoneSelect->select('timezone', 'Please select your timezone', 'Europe/London'); Also, don't forget to...
1 1138 posted 15 years ago by richt
Меня часто спрашивают как с помощью CodeIgniter получить доступ к $_GET параметрам. Для этого нужна всего лишь одна строчка кода в контроллере:...
1 1098 posted 15 years ago by stancox
A source to help you interpreting URLs in plain text as a HTML link. It's an improvement of what was proposed here : http://snipplr.com/view/2371/regex-regular-expression-to-match-a-url/
3 1624 posted 15 years ago by keevkilla
1 2952 posted 15 years ago by gilbitron
0 1938 posted 15 years ago by gilbitron
2 1013 posted 15 years ago by kwanhon
If your WordPress blog is outdated even by a few days and there's a security hole in your old version you could be seriously compromised without even knowing it. Trust me. This has happened to two of my clients and the fix is not easy. Usually, once...
0 1125 posted 15 years ago by josephknight
Check to see if HTTP POST variable exists before doing something with it.
0 1184 posted 15 years ago by jonkemp
1 ... 30 31 32 33 34 ... 58