列表解析 - python的列表字符串如何转换为php数组

WBOY
Release: 2016-06-06 20:20:29
Original
1584 people have browsed it

有一个接口返回类似python列表的字符串 [a,b,c,d],有什么方法优雅的将其转换为php数组?

回复内容:

有一个接口返回类似python列表的字符串 [a,b,c,d],有什么方法优雅的将其转换为php数组?

跨语言的话,通过json为媒介。tuple和list都是数组,相比于php

通过json

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!