We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If xml likes:
<urlset content_method="full"> <url> <loc>http://www.example.com/a.html</loc> <desc>a.html</desc> </url> <url> <loc>http://www.example.com/b.html</loc> <desc>b.html</desc> </url> </urlset>
Then, the array is ?
The text was updated successfully, but these errors were encountered:
$data = [ 'urlset' => [ '@attributes' => [ 'content_method' => 'full' ], [ '@name' => 'url', 'loc' => 'http://www.example.com/a.html', 'desc' => 'a.html' ], [ '@name' => 'url', 'loc' => 'http://www.example.com/b.html', 'desc' => 'b.html' ] ] ]; $request_xml = Formatter::make($data, Formatter::ARR)->toXml('xml','utf-8',true); dd($request_xml);
结果
<?xml version="1.0" encoding="utf-8"?> <xml> <urlset content_method="full"> <url> <loc>http://www.example.com/a.html</loc> <desc>a.html</desc> </url> <url> <loc>http://www.example.com/b.html</loc> <desc>b.html</desc> </url> </urlset> </xml>
Sorry, something went wrong.
No branches or pull requests
If xml likes:
Then, the array is ?
The text was updated successfully, but these errors were encountered: