 |
|
พอดีผมมีไฟล์ text ข้อมูลประมาณนี้
Name,Age,BirthDay,Blood,Email
ทศพล,27,Mon,O,thonsapon@gmail.com
มานิต,25,Tue,A,manit@gmail.com
สุรชัย,37,Tue,O,surachai@gmail.com
พรประภา,32,Fri,AB,pornprapa@gmail.com
รวินนา,29,Mon,O,rawinna@gmail.com
ฟีเดอน่า,Sat,AB,fiderna@gmail.com
ปรีดา,28,Wed,B,peeda@gmail.com
นริทร์,22,Mon,A,narin@gmail.com
ผมจะแปลงเป็น array แล้วแปลงเป็น json file อ่ะครับ รูปแบบประมาณด้านล่าง
Code
Array(
[0] => Array(
[Name] => ทศพล
[Age] => 27
[BirthDay] => Mon
[Blood] => O
[Email] => thonsapon@gmail.com
)
[1] => Array(
[Name] => มานิต
[Age] => 25
[BirthDay] => Tue
[Blood] => A
[Email] => manit@gmail.com
)
);
หรือมีวิธีแปลง file text เป็น json file เลยยิ่งดีครับ
รบกวนชี้แนะทีครับ ขอบคุณครับ
Tag : PHP, HTML, jQuery
|
|
 |
 |
 |
 |
Date :
2017-06-28 15:40:13 |
By :
muanpear |
View :
1705 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |