Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I have been trying to solve my problems on stackoverflow, but none seems to help. Hopefully someone here could help me.
        
        
        
            0 
        
        
            2756 
        
                    posted 10 years ago by raymondeu
            This is a simple PHP class that can be used to produce nicely formatted reports from unorganized data.
        
        
        
            0 
        
        
            2421 
        
                    posted 10 years ago by COBOLdinosaur
            A PHP function for calculating the distance between two UK postcodes
        
        
        
            0 
        
        
            1733 
        
                    posted 10 years ago by mickeywilko
            An Utility to Search Text in All Files of Any Directory in PHP
        
        
        
            1 
        
        
            1889 
        
                    posted 10 years ago by ursdeep
            Different ways to change the Maximum Execution time for PHP Scripts
        
        
        
            1 
        
        
            2726 
        
                    posted 10 years ago by ursdeep
            
            PHP
        
            WordPress - redirect to the post instead of archive page when search query returns single result  
        
                    Courtesy Kevin Chard at WPSnipp.com. 
Adding this snippet to the functions.php of your wordpress theme will redirect your search to the post automatically when wordpress only returns a single search result.
        
        
        
            1 
        
        
            1856 
        
                    posted 10 years ago by adambundy
            This snippet allows an array or multiple arrays to be re-sorted using multiple key fields.
        
        
        
            0 
        
        
            1340 
        
                    posted 10 years ago by COBOLdinosaur
            This is damn crazy! sQlite does not have all the trig functions need to do distances. So here is how you load that into sQlite on the fly.
        
        
        
            0 
        
        
            1351 
        
                    posted 10 years ago by brownrl
            Adds a Logout link to the end of your Primary Navigation is the user is logged in; else adds a Login link to the end of your Primary Navigation.
        
        
        
            0 
        
        
            1505 
        
                    posted 10 years ago by entreprenerds
            Show a list of active plugins on current site.
I use it for diplaying in ManageWP and transfer to documentation
        
        
        
            1 
        
        
            2497 
        
                    posted 10 years ago by ellegaarddk
            Show a list of days between two dates, using native php DateTime functions
        
        
        
            0 
        
        
            2035 
        
                    posted 10 years ago by snstro
            This is a common model used to run some common functions like CRUD functions, get reference data from table, check for dependencies etc. So in other model, we don't have to add those function repeatedly
        
        
        
            0 
        
        
            2515 
        
                    posted 10 years ago by invtr
            This is the basic code that you need to know to connect and list data with PDO.
Don't use de old method (mysql_connect and mysqli_connect) to connect and interact with databases.
        
        
        
            0 
        
        
            2581 
        
                    posted 10 years ago by snstro
            This is a little code snippet that I use in almost every project that isn’t based on a popular CMS. Since its fairly expensive to hit the database on every page load, its a smart idea to cache the plain HTML markup of your page and serve that up. Y...
        
        
        
            0 
        
        
            2436 
        
                    posted 10 years ago by a1ias
            Simple script to send SMS throught our HTTP API (Afilnet) with PHP. Steps:
1.- Register in Afilnet. http://www.afilnet.com/anunciante/registrar.php
2.- Login and get credits (10 free) to send SMS
3.- Use this script or html form example include in...
        
        
        
            1 
        
        
            2563 
        
                    posted 10 years ago by Afilnet
            Translate non alphanumeric characters into an underscore. Doesn't create double underscores if there's two spaces in a row. Also turns name to lowercase. Use with trim to avoid spaces at front or end.
        
        
        
            0 
        
        
            3038 
        
                    posted 10 years ago by flatearthcomms
            Sort & query arrays in PHP. Sort multi dimensional arrays by object properties and filter the array by specific criteria.
Documentation:
https://github.com/mattnicholson/DataList
        
        
        
            1 
        
        
            1633 
        
                    posted 10 years ago by mattnicholson
            The code below can be used to lookup IP address in bulk in return of geolocation information using PHP programming languages and MySQL database. In this tutorial, we use the IP2Location LITE database to lookup country of origin from the visitor's IP...
        
        
        
            1 
        
        
            3047 
        
                    posted 10 years ago by Hexahow
            Use PHP's DOM parser to convert a table into plain text (including links with images)
        
        
        
            0 
        
        
            3364 
        
                    posted 10 years ago by nigelnquande
            Bei Autocomplete aus größeren Datenbanken ist es sinnvoll, die Datenbankabfrage in eine separate php-Datei zu verlegen.
        
        
        
            0 
        
        
            1393 
        
                    posted 10 years ago by ulfinger
            
