0

これは初めてで、要素を参照する方法がわかりません。

PHP を使用していますが、First_Name の値を HTML テーブルのセルに入力できるようにしたいと考えています。

助けてくれてありがとう。

出力の抜粋:

SimpleXMLElement Object
(
[@attributes] => Array
    (
        [organization_KEY] => 5728
    )

[supporter-supporter_KEY-supporter_groups] => SimpleXMLElement Object
    (
        [item] => Array
            (
                [0] => SimpleXMLElement Object
                    (
                        [supporter_KEY] => 6147839
                        [organization_KEY] => 12345
                        [chapter_KEY] => SimpleXMLElement Object
                            (
                            )

                        [Last_Modified] => Thu Jul 09 2009 15:11:39 GMT-0400 (EDT)
                        [Date_Created] => Thu Jul 09 2009 14:44:22 GMT-0400 (EDT)
                        [Title] => Mr.
                        [First_Name] => Michael
                        [MI] => SimpleXMLElement Object
                            (

----------------------------------------------------

php ----------------------------------------------------
curl_setopt($ch, CURLOPT_URL, "$url/getLeftJoin.sjs");
$fields = array('object' => 'supporter(supporter_KEY)supporter_groups',       'condition'=>'supporter_KEY=123456' );
echo (http_build_query($fields));
//return the transfer as a string
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
// $output contains the output string
$output = curl_exec($ch);
//Populate results from salsa into SimpleXML object
// See http://us3.php.net/manual/en/book.simplexml.php for more information
// on SimpleXML objects in PHP
$data = simplexml_load_string($output);
**echo ("data ". $data->supporter->First_Name);** 

4

1 に答える 1