Home > Backend Development > PHP Tutorial > js变量怎么用

js变量怎么用

WBOY
Release: 2016-06-13 13:29:51
Original
889 people have browsed it

js变量如何用
php页面 传到html页面一个数组$Itemname js怎么接受?我直接用了 好像不对 我新手 求助啊
html页面 用 var_dump($Itemname) ?> 有值!

------解决方案--------------------
为了不误导楼主,JSON.parse用来JS解析json串。
------解决方案--------------------
人家都说了是 gbk 的了

PHP code
function recursive_urlencode(&$val) {
  if(is_array($val)) foreach($val as &$v) Recursive($v);
  else $val = urlencode($val);
}

echo urldecode( json_encode( recursive_urlencode($你的数组) ) ); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
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