Christian Stocker wrote:
var_dump($xpath->query("count(/catalog/cd")->item(0));
this doesn't work yet in DOM. The returned value has to be a nodeset.
Will be fixed some day ;)
Thanks, both Jason and Christian
I found something else that I think is strange.
$dom = new DOMDocument();
$root = $do
Assume an XML file that looks like:
..
..
..
... and that I would like to know the number of CDs. An xpath expression
would look like count(/catalog/cd), but how do I run this expression?
$dom = new DOMDocument();
$dom->load("catalog.xml");
$xpath = new DOMXpath($dom);
var_dump($xp
Hi everybody,
This might be a RTFM or STFW-question, but I haven't found it.
I want to validate a form (in page1.php) to check if the user has entered a
correct email-adress and more, and if he needs to correct some fields, I'd
like to display the form again with all correct values filled in and
To make a long story short: I'm trying to compile PHP 4.2 with Apache, GD,
T1lib and more. This is what I'm using:
[configuring apache first]
./configure --with-apache=../apache_1.3.24 --enable-ftp --with-mysql=/usr/l
ocal/mysql/ --enable-track-vars --enable-inline-optimization --disable-debug
PEAR? I think it would be better if someone did a "real" PHP module for ImageMagick,
just like PerlMagick is for Perl. There is one at http://php.chregu.tv/imagick/, but
it's far from complete. If someone would like to help him with the project then it
would be great.
ImageMagick is so much ea
If you only want to replace strings, then drop the regular expression functions! (a
common mistake)
Use for example str_replace, or in this case, strtr which is better because it accepts
an array as replacement pattern.
For example:
$foo = array("foo" => "apple", "bar" => "banana");
$stri
6 matches
Mail list logo