Skip to content

Commit 7c2f4d5

Browse files
authored
Fix Syntax $input
1 parent 88f4656 commit 7c2f4d5

File tree

1 file changed

+65
-63
lines changed

1 file changed

+65
-63
lines changed

README.md

Lines changed: 65 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -13,69 +13,71 @@ print $xml->buildXML($input);
1313
</code></pre>
1414

1515
INPUT:
16-
<pre><code>$input = array('product' => array(
17-
'@id' => 7,
18-
'name' => 'some string',
19-
'seo' => 'some-string',
20-
'ean' => '',
21-
'producer' => array(
22-
'name' => null,
23-
'photo' => '1.png'
24-
)
25-
'stock' => 123,
26-
'trackstock' => 0,
27-
'new' => 0,
28-
'pricewithoutvat' => 1111,
29-
'price' => 1366.53,
30-
'discountpricenetto' => null,
31-
'discountprice' => null,
32-
'vatvalue' => 23,
33-
'currencysymbol' => 'PLN',
34-
'#description' => '',
35-
'#longdescription' => '',
36-
'#shortdescription' => '',
37-
'category' => array(
38-
'photo' => '1.png',
39-
'name' => 'test3',
40-
)
41-
'staticattributes' => array(
42-
'attributegroup' => array(
43-
1 => array(
44-
'@name' => 'attributes group',
45-
'attribute' => array(
46-
0 => array(
47-
'name' => 'second',
48-
'description' => '&lt;p&gt;desc2&lt;/p&gt;',
49-
'file' => '',
50-
),
51-
1 =>
52-
array
53-
'name' => 'third',
54-
'description' => '&lt;p&gt;desc3&lt;/p&gt;',
55-
'file' => '',
56-
),
57-
)
58-
)
59-
)
60-
),
61-
'attributes' => array(),
62-
'photos' => array(
63-
'photo' => array(
64-
0 => array(
65-
'@mainphoto' => '1',
66-
'%' => '1.png',
67-
),
68-
1 => array(
69-
'@mainphoto' => '0',
70-
'%' => '2.png',
71-
),
72-
2 => array(
73-
'@mainphoto' => '0',
74-
'%' => '3.png',
75-
)
76-
)
77-
)
78-
));
16+
<pre><code>
17+
$input = array(
18+
'product' => array(
19+
'@id' => 7,
20+
'name' => 'some string',
21+
'seo' => 'some-string',
22+
'ean' => '',
23+
'producer' => array(
24+
'name' => null,
25+
'photo' => '1.png'
26+
),
27+
'stock' => 123,
28+
'trackstock' => 0,
29+
'new' => 0,
30+
'pricewithoutvat' => 1111,
31+
'price' => 1366.53,
32+
'discountpricenetto' => null,
33+
'discountprice' => null,
34+
'vatvalue' => 23,
35+
'currencysymbol' => 'PLN',
36+
'#description' => '',
37+
'#longdescription' => '',
38+
'#shortdescription' => '',
39+
'category' => array(
40+
'photo' => '1.png',
41+
'name' => 'test3',
42+
),
43+
'staticattributes' => array(
44+
'attributegroup' => array(
45+
1 => array(
46+
'@name' => 'attributes group',
47+
'attribute' => array(
48+
0 => array(
49+
'name' => 'second',
50+
'description' => '<p>desc2</p>',
51+
'file' => '',
52+
),
53+
1 => array (
54+
'name' => 'third',
55+
'description' => '<p>desc3</p>',
56+
'file' => '',
57+
),
58+
)
59+
)
60+
)
61+
),
62+
'attributes' => array(),
63+
'photos' => array(
64+
'photo' => array(
65+
0 => array(
66+
'@mainphoto' => '1',
67+
'%' => '1.png',
68+
),
69+
1 => array(
70+
'@mainphoto' => '0',
71+
'%' => '2.png',
72+
),
73+
2 => array(
74+
'@mainphoto' => '0',
75+
'%' => '3.png',
76+
)
77+
)
78+
)
79+
)
80+
);
7981
</code></pre>
8082

8183
OUTPUT (XML data):

0 commit comments

Comments
 (0)