News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

DevShed:
Inserting Comments and Accessing Nodes with the DOM XML Extension in PHP 5
0 comments :: posted Tuesday March 11, 2008 @ 15:40:21
voice your opinion now!

DevShed continues their series looking at using the DOM extension in PHP5 to work with XML in your application. They've already looked at adding attributes and creating CDATA information in a new DOM document. This time they build on that and also include new methods - appending comment nodes and getting at XML nodes by their IDs.

I'm talking about the DOM XML extension, which allows you to handle XML documents by using the DOM API. Thus, if you're interested in learning how to put this extension to work for you quickly, look no further, because you've come to the right place. [...] In this third installment of the series, I'll be teaching you specifically how to append comment nodes to a given XML string and how to extract certain elements via their IDs.

They review the method to add attributes and CDATA to an XML document first. Then they cover the other two new topics - appending comment nodes and grabbing nodes by their ID attribute.

tagged with: dom extension php5 node cdata attribute id fetch tutorial


DevShed:
Developing a Discussion Forum in PHP with Recursion (Part 3)
0 comments :: posted Monday May 15, 2006 @ 11:44:01
voice your opinion now!

On DevShed today, they've posted this new tutorial continuing their "recursion in PHP" series - "Developing a Discussion Forum in PHP with Recursion".

After covering in detail how to define recursive method and functions, the question is: what comes next? Luckily, there's vast terrain to explore with reference to using recursion in PHP. As I said in previous articles of this series, recursion can be used in cases where a specific tree structure or a linked list needs to be navigated, in order to display, add, delete or edit its values. It's exactly for that reason that this last article will be focused on building an extensible discussion forum, which precisely uses a tree structure (implemented on a single MySQL database table) for displaying forum messages and adding new posts.

Using what they've taught in the first two parts of the series, they put it to good use, giving you a step-by-step guide to a simple recursive forum. They start with the database structure (always a good thing) and work out from there, creating the "ThreadProcessor" class and fetch functionality to grab the thread's contents. They also include a bit of functionality to create threads as well. It's not much more than that, so don't expect too much, but it is a great place to start.

tagged with: php recursion forum message board part3 fetch view php recursion forum message board part3 fetch view


ajax cakephp zend PHP5 PEAR conference mysql application pecl database security job zendframework releases code developer book package framework release

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework