请教php如何讲数据库返回的查询数据转化为json数据格式
Jun 13, 2016 pm 12:44 PM
请问php怎么讲数据库返回的查询数据转化为json数据格式
在zend 框架里面的
$res=$db->query("select name from job_type where tid=$type")->fetchAll();
我把数组打出来是这个东西:
array(2) { [0]=> array(1) { ["name"]=> string(6) "技工" } [1]=> array(1) { ["name"]=> string(6) "普工" } }

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to enable or disable taskbar thumbnail previews on Windows 11

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

What are the differences between Huawei GT3 Pro and GT4?

10 Ways to Adjust Brightness on Windows 11
