- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
<?php
function findAttribute($object, $attribute) {
foreach($object->attributes() as $a => $b) {
if ($a == $attribute) {
$return = $b;
}
}
if($return) {
return $return;
}
}
?>
guest 29.03.2010 07:06 # +1
guest 31.03.2010 20:35 # 0
А почему?
azzz 29.03.2010 10:05 # +5
larrygingras2 09.04.2010 20:32 # 0
HyperGeek 29.03.2010 10:13 # 0
guest 29.03.2010 13:30 # 0
Suor 29.03.2010 17:52 # 0
guest 29.03.2010 20:10 # 0
striker 30.03.2010 01:10 # +0.2
к аттрибутам в simplexml можно обращаться как к элементам массива.
http://ru.php.net/manual/en/simplexml.examples-basic.php
SimpleXML can also access element attributes. Access attributes of an element just as you would elements of an array .
striker 01.04.2010 01:04 # +1.2
guest 10.04.2010 13:40 # +1
striker 10.04.2010 13:41 # 0
guest 13.04.2010 00:25 # 0
guest 13.04.2010 05:13 # 0