Navigation Home / Tags / PHP

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

« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »
1
Date Submitted Fri. May. 15th, 2009 9:14 AM
Revision 1
Beginner ChronoFish
Tags Array | parser | PHP | XML | XML2Array | XMLToArray
Comments 1 comments
Here is a my latest refinement of an XML2Array function. It creates an associative array where tags are the keys. When tags have attributes, it becomes part of the key (optionally). The values of the resultant array is itself an array of values OR another XML2Aarray array.

- Enjoy
1
Date Submitted Mon. Mar. 23rd, 2009 2:07 AM
Revision 1
Scripter mycodeofshailendra
Tags PHP
Comments 0 comments
Just add the following code to your .htaccess file in the highest folder of your web directory and yor visitors will be forced to use the www version.
1
Date Submitted Mon. Dec. 29th, 2008 2:11 PM
Revision 1
Helper ffxfiend
Tags "find date" | Date | PHP
Comments 0 comments
This function will let you find the Sunday, Monday, Tuesday, etc of a month and return to you that date.

It is a modification of a script I found online at this site: http://filchiprogrammer.wordpress.com/2008/02/27/getting-the-first-monday-of-the-month/.

The function takes three arguments, the month, year and the weekday you are looking for. The weekday is represented by an integer, 0 for Sunday, 1 for Monday and so on.
1
Date Submitted Mon. Dec. 29th, 2008 2:03 PM
Revision 1
Helper ffxfiend
Tags Date | future | PHP
Comments 0 comments
This function will take four arguments, the year, month, day and number of days in the future you want to go and return to you as an array (year,month,day) of that date.

It is a simple function that is only for convenience. It is meant to be used in conjunction with the list() command.
0
Date Submitted Fri. Nov. 28th, 2008 3:12 AM
Revision 1
Beginner RB
Tags PHP | xoops
Comments 0 comments
auto create and check token with different xoops versio
2
Date Submitted Tue. Nov. 4th, 2008 8:32 AM
Revision 1
Beginner cicero
Tags identify | Key | PHP | Random | unique
Comments 2 comments
This php script provides a unique random key with 32 characters and can be used to avoid the system to pass some primary keys across the url, by example.
1
Date Submitted Wed. Oct. 29th, 2008 11:26 AM
Revision 1
Helper Celebhir
Tags Directory | File | PHP | Recursive | search
Comments 1 comments
This function tries to locate a file in a give folder (either single level, or in any sub folder). Returns the relative file and path, or FALSE if not found. Skips over "." and "..".
1
Date Submitted Wed. Oct. 29th, 2008 10:51 AM
Revision 1
Helper Celebhir
Tags Directory | find | Folder | PHP | Recursive | search
Comments 1 comments
This function takes a directory, and a "folder" search parameter.
If it finds the directory (either in single level, or any sub folder) it will return the relative path of that folder. "FALSE" if not found. Skips over files and "." and ".." directories. Recursive by default.
1
Date Submitted Wed. Oct. 29th, 2008 9:21 AM
Revision 1
Helper Celebhir
Tags Directory | Files | PHP | Recursive | structure | tree
Comments 0 comments
Takes a given directory and lists all the files and folders under it, including sub folders. Resulting array contains associative (folders) and indexed (files) elements. Doesn't return "." and ".."
2
Date Submitted Thu. Aug. 28th, 2008 9:33 AM
Revision 1
Scripter Fordiman
Tags buffering | errors | Output | PHP | template
Comments 0 comments
Best use of ob_, custom error handling, and variable variales evar: simple templating.

_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.

Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.

t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.

Play around with t(..) to find out more; I don't feel like documenting it.
« Previous 1 2 3 4 5 6 7 8 9  ...  13 14 Next »