次の問題を解決してください
01
//http://blog.1dnet.net
02
function
_encode(
$arr
)
03
{
04
$na
=
array
();
05
foreach
(
$arr
as
$k
=>
$value
) {
06
$na
[_urlencode(
$k
)] = _urlencode (
$value
);
07
}
08
return
addcslashes
(urldecode(json_encode(
$na
)),
"rn"
);
09
}
1010
1111
function<code class="keyword">function
_urlencode(
$elem
)
_urlencode(
$elem<tbody><code class="plain">)<code>12
{
12
{<code>13
if
(
is_array
(
$elem
)){
13
<code>14
if<code class="spaces">
foreach
(
$elem
as
$k
=>
$v
){
(
is_array<tbody><code class="plain">(<code>15
$elem<code class="spaces"> $na
[_urlencode(
$k
)] = _urlencode(
$v
);
)){
16
14
}
foreach<tbody><code class="plain">(<code>17
$elem<code class="spaces">
return
$na
;
as
$k=>18
$v<code class="spaces">
}
){
19
15
return
urlencode(
$elem
);
$na<tbody><code class="plain">[_urlencode(<code>20
$k<code class="plain">}
)] = _urlencode(
$v<br><code class="plain">);
<p align="left">
</p>
<div style="display:none;">
16<span id="url" itemprop="url">
<code class="spaces">
}<span id="indexUrl" itemprop="indexUrl">
</span>
<span id="isOriginal" itemprop="isOriginal">
17</span>
<code class="spaces"> <span id="isBasedOnUrl" itemprop="isBasedOnUrl"><code class="keyword">return
$na<span id="genre" itemprop="genre"><code class="plain">;
18
<code class="plain">}
<div class="art_confoot">
</div>
19🎜
<code class="spaces"> 🎜<code class="keyword">return🎜 <code class="plain">urlencode(🎜<code class="variable">$elem🎜<code class="plain">) ;🎜
🎜
🎜
20🎜
<code class="plain">}🎜
🎜
🎜🎜
🎜🎜🎜http://www.bkjia.com/PHPjc/735166.html🎜🎜www.bkjia.com🎜🎜true🎜🎜http://www.bkjia.com/PHPjc/735166.html🎜🎜技術記事🎜🎜解以下问题 json_encode 中文後の文字列不可阅读 json_encode 多级数组中文乱码问题 json_encode 数组中包含换行時間错误问题 json_encode 数组中键中...🎜🎜🎜🎜
🎜🎜