Build full date select boxes





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »
14
Date Submitted Thu. Mar. 1st, 2007 3:48 PM
Revision 1
Helper mjlintz
Tags PHP
Comments 5 comments
Display contents of a folder, see comments in code.
14
Date Submitted Wed. Mar. 22nd, 2006 6:10 PM
Revision 2
Beginner nev3rm0re
Tags PHP | String
Comments 1 comments
This function calculates how many lines will text occupy.
Example (simple):


$string = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus tincidunt posuere dolor";

$num_lines = how_many_lines(10, $string);

It accepts a third, optional, parameter $options, that allows you to change behaviour. $options should be array. Following configuration options are available:

'white_spaces' - default: array(' ', "\t") - array of chars, that should be treated as whitespace.

'new_lines' - default: array("\r\n", "\n") - array of strings, that should be treated as newlines. For example, for HTML you can set 'new_lines' => array('');

'force_line_breaks' - default: true - force wrapping, when the token is longer than width, or not. If set to false, and token cannot be fitted into $width, function will return false;

'callback' - default: null - callback function for determining character width. Must accept at least one parameter - $char

'callback_params' - default: array() - optional additional callback parameters

'char_widths' - default: null - associative array in a form $char => $width, which contains char width. If $char is not found in the array, it's width is defaulted to 0.

14
Date Submitted Mon. Oct. 10th, 2005 10:18 AM
Revision 1
Coder mattrmiller
Tags Extension | File | PHP
Comments 1 comments
Get File Extensio
14
Date Submitted Mon. Oct. 10th, 2005 11:05 AM
Revision 1
Coder mattrmiller
Tags HTML | PHP | String | Strip
Comments 2 comments
Strip HTML
13
Date Submitted Mon. Sep. 18th, 2006 5:13 AM
Revision 1
Helper nothingless
Tags forcodegrrl | PHP
Comments 3 comments
For those times you need to do a loop in PHP, but have the outcome be in descending order (ie, start at 10 and end at 1).
13
Date Submitted Tue. Sep. 19th, 2006 7:11 PM
Revision 1
Helper RaX
Tags PHP
Comments 10 comments
This little function will split an e-mail address passed to it at the @ sign, and make sure that there is a valid e-mail server at the other end =)
13
Date Submitted Mon. Oct. 23rd, 2006 10:19 PM
Revision 1
Helper jdenton
Tags Calendar | Date | days | PHP
Comments 0 comments
daysBeteenDates will calculate the number of days between 2 dates in the form of 'YYYY-MM-DD'.
13
Date Submitted Fri. Oct. 20th, 2006 8:10 PM
Revision 1
Beginner stalfos
Tags PHP | Recursive | syntax
Comments 1 comments
Recursively checks for all *.php and *.tpl files in the directory specified (or the current directory if one is not specified) and runs `php -l $file`. Only outputs the errors.
13
Date Submitted Sat. Oct. 21st, 2006 9:21 AM
Revision 1
Beginner hax
Tags mysql | PHP | phps
Comments 1 comments
Pagination Class , I think everyone knew now what's it does and means

NT: This class written by my friend have phun!
13
Date Submitted Tue. Mar. 6th, 2007 2:36 PM
Revision 1
Beginner wlasson
Tags "image resize" | GD | images | PHP | Resize
Comments 1 comments
This is a simple function that resizes and image using the GD add on for PHP.
Just a disclaimer: I know its not perfect, but i figured i would post it because the only other one on here is way confusing to some new PHP developers. Hopefully this one will help you learn how to use GD, and then you can write a better one.
« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »