Welcome To Snipplr
Everyone's Recent Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Como parametro se tiene que tener la cantidad de meses que se desea sumar a la fehc a de inicio
0
724
posted 12 years ago by serialk89
This 'Check if HTTPS is on in PHP' script accounts for servers which set HTTPS differently. Some servers do not set HTTPS, others set it to 'off', etc. Only checking if HTTPS is on will cause an 'undefined index error' in these cases.
0
1007
posted 12 years ago by kf0l
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
880
posted 12 years ago by Knarf
Ordena Array Bidimensional Asociativo de acuerdo a parametro del array.
0
780
posted 12 years ago by serialk89
Esto es por si estamos desarrollando una aplicación en la cual necesitamos manejar la fecha y hora con javascript.
0
765
posted 12 years ago by jrobinsonc
Condition = The condition which must be met.
True = Executed if the condition is met.
False = Executed if the condition failes.
0
732
posted 12 years ago by beneberle
Search for a string, if matched replace with second provided paramater. Third parameter is the variable whose value is the string you'd like to search.
0
862
posted 12 years ago by inreflection7
Wordpress by default wraps images in <p> tags, this kills that.
3
997
posted 12 years ago by rliverman
If the image source is not in the database a default image is displayed.
0
1408
posted 12 years ago by blantonious
Simple script utilising the `gpg_encrypt.php` code (`http://business-php.com/opensource/gpg_encrypt/`) that will encrypt both the body and attachment of an email on upload.
0
1151
posted 12 years ago by davo
Creates table structure for pitchfx data that is provided by mlb.com. Open PHP file and enter username and password for localhost. Feel free to customize to suit your preference.
0
872
posted 12 years ago by wa-rufio
Open PHP file and enter User Credentials for localhost. The default dates are set to negotiate the 2011 season, but change the date variables to match your desired season data. The start date should be the day before opening day, and the end date t...
0
898
posted 12 years ago by wa-rufio
Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
1
913
posted 12 years ago by adambundy
UPDATE: might be easier or faster to use this now (also courtesy Pippin): http://pippinsplugins.com/get-all-attached-media/
**courtesy Pippin Williamson (http://pippinsplugins.com/image-gallery-short-code-using-post-attachments/)
use shortcode...
1
963
posted 12 years ago by adambundy
dynamically selects a value in a select according to what's already in the DB
0
672
posted 12 years ago by dato
Use PHP to get JSON
1) set the PHP to the URL of the JSON
2) echo a variable with the loaded data
3) use a request via jQuery to get the variable from PHP
0
949
posted 12 years ago by inreflection7
If you’ve ever wanted to display your latest Twitter tweets on a website, here is method to do that using PHP.
0
975
posted 12 years ago by i-am-andy
This snippet shows a dynamic way to enable extra default include paths.
0
558
posted 12 years ago by tomcottrill
Set up a basic template:
<html>
<head>
<title>[[++site_name]] - [[*pagetitle]]</title>
<base>
<meta>​
</head>
<body>
[[*content]]
</body>
</html>
Content:
<div>
<h4>The ACME web site is currently under development</h4>
<p>Please...
0
634
posted 12 years ago by hotdiggity
Snippet for getting the layout handles in Magento on each request, helpful for front-end developers.
1
945
posted 12 years ago by zoranmk
Snippet for logging down all of the layout updates loaded on each request in Magento.
1
976
posted 12 years ago by zoranmk