News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

DevShed:
Parsing Child Nodes with the DOM XML extension in PHP 5
0 comments :: posted Tuesday April 08, 2008 @ 09:47:48
voice your opinion now!

Alejandro Gervasio has finished up his series on DevShed looking at working with the DOM extension in PHP5 with this new article, a look at parsing child nodes.

In this last chapter of the series, I'm going to teach you how to handle the child nodes of an XML document by way of two simple methods, called hasChildNode() and removeChild() respectively. So let's not waste any more time in preliminaries and learn how to use them in a helpful way.

They review some of the concepts mentioned previously before moving ahead to the use of the hasChildNodes and removeChild methods to check for children and get rid of only certain ones.

tagged with: dom xml php5 tutorial child node haschildnodes removechild


Arnold Daniels' Blog:
A dark corner of PHP class casting
0 comments :: posted Wednesday February 20, 2008 @ 12:08:00
voice your opinion now!

In this blog entry Arnold Daniels talks about an issue he had in the past (needing a bit more functionality than the PEAR DB library could offer) and how he ended up solving it with what he calls a "dark corner" of PHP - class casting.

PHP has a function serialize, which can create a hash from any type of variable, scalars, array, but objects as well. Using the unserialize function, PHP can recreate the variable from the serialized hashed. If we look at how an object is serialized, we see only the properties and the class name are stored.

His method allows for class manipulation via changes to the serialized class information (like changing the value of the name parameter). His "casttoclass()" function makes changing this value simple.

tagged with: class casting serialize extend parent child


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

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