Submitted by Cody Bonney on Wed, 01/18/2012 - 14:37
In PHP, instead of handling multiple conditions in an if stament using the logical OR operator as follows
Submitted by Cody Bonney on Wed, 01/18/2012 - 08:48
Takes in an array of arrays representing JSON objects. Concatenates them in linear order, slices them to a length defined by the class, and returns the result as a JSON string.
Submitted by Cody Bonney on Thu, 01/12/2012 - 15:31
Using the php function array_merge() allows for the merging of multiple arrays.
It works on normal arrays as well as associative arrays.
Submitted by Cody Bonney on Sat, 01/07/2012 - 13:59
function roundup_prec($in,$prec)
{
Submitted by Cody Bonney on Sat, 01/07/2012 - 12:17
Notice the backslash before each reference to a built-in class. That is the proper way of using them in a PHP 5.3 namespace context.
You need to know which iterator and flags to use.
PHP iterators have been written to serve general purposes.
Submitted by Cody Bonney on Wed, 01/04/2012 - 10:29
This example will initialize an XML parser.
It will then load the XML.
It will then loop through all the elements of the note element.
When XML generates it often contains white-spaces between the nodes.
The XML DOM parser will treat these as ordinary elements.
This can be troublesome of you are not aware of it.
note.xml
Submitted by Cody Bonney on Wed, 01/04/2012 - 10:12
This example will create a DOMDocument-Object and load the XML from note.xml into it.
It will then use the saveXML() function to put the XML document into a string and output it.
note.xml
Submitted by Cody Bonney on Wed, 01/04/2012 - 09:54
The DOM parser allows for the processing of XML documents in PHP.
To work with XML documents, an XML parser is required.
The DOM XML parser functions are built into the PHP core.
There are two main types of XML parsers.
Tree-based XML parsers transform an XML document into a tree structure.
Event-based XML parsers view an XML document as a series of events, when events occur, it calls functions to handle them.
The DOM parser is a tree-based parser.
XML Snippet:
Submitted by Cody Bonney on Wed, 01/04/2012 - 09:39
Cross-browser JavaScript library.
Simplifies client-side scripting of HTML.
Syntax makes it easier to navigate a document and select DOM elements, handle events, and create Ajax applications.
Allows for the creation of plugins on top of the JavaScript library.
Was originally going to be called jSelect, it doesn't do much querying.
Uses a selector engine called Sizzle to make DOM element selections.
Allows for DOM traversal and modification.
Allows for Events.
Allows for CSS modifications.
Submitted by Cody Bonney on Wed, 01/04/2012 - 09:19
Ajax stands for Asynchronous JavaScript and XML.
It is a collection of methods to create asynchronous web applications.
The DOM is accessed with JavaScript.
HTML and CSS are used to markup style information.
XML is used for the interchange of data.
XSLT is used for the manipulation of that data.
XMLHttpRequest object is used for asynchronous communication.
JavaScript and the XMLHttpRequest object are used to swap data asynchronously between browser and server.