Home > Backend Development > PHP Tutorial > N Tips for PHP

N Tips for PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:06:54
Original
1143 people have browsed it

N Tips for PHP.

XML

Convert xml string to array?

We all know that converting json into an array is json_decode(str,false), but what about converting XML strings? (XML is gradually becoming unpopular)

A common practice on the Internet is:

<code>$array=json_decode(json_encode(simplexml_load_string($xmlstring)),true);`
</code>
Copy after login

Isn’t it a bit hehe? This is PHP.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above has introduced the N tips of PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template