Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > อยากให้ Json ส่งข้อมูลแบบนี้ต้องเขียนยังไงค่ะ PHP ช่วยด้วยค่ะ



 

อยากให้ Json ส่งข้อมูลแบบนี้ต้องเขียนยังไงค่ะ PHP ช่วยด้วยค่ะ

 



Topic : 112820



โพสกระทู้ ( 2 )
บทความ ( 0 )



สถานะออฟไลน์




Code
{"owner":[{"idv":"1","subject":"\u0e15\u0e34\u0e27\u0e2a\u0e23\u0e38\u0e1b \u0e27\u0e34.\u0e2d\u0e32\u0e0d\u0e32 \u0e15\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1a\u0e2d\u0e21\u0e1a\u0e4c \u0e0a\u0e48\u0e27\u0e07\u0e17\u0e35\u0e48 1","url":"rtmp:\/\/103.22.181.153:1935\/vod\/viayabom1.mp4","image":"1.png"},{"idv":"2","subject":"\u0e15\u0e34\u0e27\u0e2a\u0e23\u0e38\u0e1b \u0e27\u0e34.\u0e2d\u0e32\u0e0d\u0e32 \u0e15\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1a\u0e2d\u0e21\u0e1a\u0e4c \u0e0a\u0e48\u0e27\u0e07\u0e17\u0e35\u0e48 2","url":"rtmp:\/\/103.22.181.153:1935\/vod\/viayabom2.mp4","image":"2.png"},{"idv":"3","subject":"\u0e15\u0e34\u0e27\u0e2a\u0e23\u0e38\u0e1b \u0e27\u0e34.\u0e2d\u0e32\u0e0d\u0e32 \u0e15\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1a\u0e2d\u0e21\u0e1a\u0e4c \u0e0a\u0e48\u0e27\u0e07\u0e17\u0e35\u0e48 3","url":"rtmp:\/\/103.22.181.153:1935\/vod\/viayabom3.mp4","image":"3.png"},{"idv":"4","subject":"\u0e15\u0e34\u0e27\u0e2a\u0e23\u0e38\u0e1b \u0e27\u0e34.\u0e2d\u0e32\u0e0d\u0e32 \u0e15\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1a\u0e2d\u0e21\u0e1a\u0e4c \u0e0a\u0e48\u0e27\u0e07\u0e17\u0e35\u0e48 4","url":"rtmp:\/\/103.22.181.153:1935\/vod\/viayabom4.mp4","image":"4.png"},{"idv":"5","subject":"\u0e15\u0e34\u0e27\u0e2a\u0e23\u0e38\u0e1b \u0e27\u0e34.\u0e2d\u0e32\u0e0d\u0e32 \u0e15\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e1a\u0e2d\u0e21\u0e1a\u0e4c \u0e0a\u0e48\u0e27\u0e07\u0e17\u0e35\u0e48 5","url":"rtmp:\/\/103.22.181.153:1935\/vod\/viayabom5.mp4","image":"5.png"}],"success":1}


เขียน PHP ไม่เป็นไม่รู้จะถามใครดี



Tag : PHP, MySQL, Android









ประวัติการแก้ไข
2014-11-25 13:12:48
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-11-25 12:51:37 By : XeeZaa View : 814 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code
$objConnect = mysql_connect("localhost","root","") or die(mysql_error()); $objDB = mysql_select_db("mydatabase"); mysql_query("SET NAMES UTF8"); $strSQL = "SELECT * FROM customer WHERE 1 AND CountryCode like '%".$strCountry."%' "; $objQuery = mysql_query($strSQL) or die (mysql_error()); $intNumField = mysql_num_fields($objQuery); $resultArray = array(); while($obResult = mysql_fetch_array($objQuery)) { $arrCol = array(); for($i=0;$i<$intNumField;$i++) { $arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i]; } array_push($resultArray,$arrCol); } return json_encode($resultArray);


PHP และ JSON กับ Web Service การรับส่งข้อมูลจาก MySQL







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-11-25 14:18:03 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : อยากให้ Json ส่งข้อมูลแบบนี้ต้องเขียนยังไงค่ะ PHP ช่วยด้วยค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่