Welcome To Snipplr
Everyone's Recent Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Replace "getMyAttribute" with "get" followed by the attribute name in camel case.
0
708
posted 14 years ago by Groove
PHP scripting block can be placed anywhere in the document. It always starts with <?php>.
The example of PHP code below sends the text “Oheon.com†to the browser:
0
751
posted 14 years ago by Masis
Gets string and length and return string of given length. Makes sure half word in not in the end.
0
665
posted 14 years ago by nilambar
To use:
$update_sql = querys($sql);
or
$select_sql = getresult($sql);
Used simplify selecting rows from a database. You'll need to pass in the SQL statement.
0
788
posted 14 years ago by shawntysco
Used to delete rows from the database. \r\nTo use:\r\n$del = delete(\"quick_links\", $_GET[\'id\']) ;
0
675
posted 14 years ago by shawntysco
Makes basic insert statements a breeze to type while doing basic PHP inserts.\r\n*The function for \\\'querys\\\' on line 44 can be found here: http://snipplr.com/view/40911/query-the-database-php/ *
0
678
posted 14 years ago by shawntysco
If you're ever bothered by CakePHP's limited breadcrumbs support for displaying them use this to build your own!
2
768
posted 14 years ago by stolkchris
Shows a month calendar, forward and backward navigation by month. Week numbers are shown at left col. Days and weeks are clickable. Days, weeks and months names are in Danish. Comments and suggestions are welcome
1
1298
posted 14 years ago by zafu
I’ve recently had to quickly parse an Apache log file, to get basic usage statistics for a site over a month and wanted the ability to quickly process any general logs and store them in a MySQL table, so I’ve made a small package class.log.
In...
2
1254
posted 14 years ago by dom111
I’ve recently had to parse some pretty large XML documents, and needed a method to read one element at a time.
Here’s a fairly simple solution in PHP.
0
1735
posted 14 years ago by dom111