Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,193,814 members, 7,952,300 topics. Date: Wednesday, 18 September 2024 at 01:29 PM |
Nairaland Forum / Science/Technology / Webmasters / Trivial Question Csv/arraycollection (750 Views)
How To Import Contacts (using CSV) On Facebook? / Reading Different Versions Of Excel Data (CSV,XLS,XLSX) With Phpexcel Library / C# Csv Parser (2) (3) (4)
Trivial Question Csv/arraycollection by Nobody: 5:46pm On Dec 06, 2012 |
Hi Guys yes Pc Guru has come with his wahala again, i wrote a PHP CommandLine to extract a CSV which was converted from an Excel file containing Multi-choice questions for Moodle (a Learning management system) however, because of the time limit, i won't lie the scripts works but its more 100% hardcoded but now the job is done, and subsequent request like this will obviously come, the question is i have decided to write a class that dumps CSV to a good Data Structure, the Dilemma is 1. Should i take the CSV and Dump to a ArrayCollection (i know PHP has no such) this will be a lot easier, and make each field have a magic get and setter method so if a field like "text" exists, getText and SetText will automatically alter it. 2. Or Do i just simply dump the CSV to Arrays and just pick from them. Now with the first i'm hoping to do the above
anyway i know there are better coders than me over here so i won't mind some insights on it. thanks a lot, i intend to use this to create a simple class that takes CSV and exports them to MoodleXML for Quizzes. |
Re: Trivial Question Csv/arraycollection by Nobody: 5:46pm On Dec 06, 2012 |
Arggghhh damn smileys |
Re: Trivial Question Csv/arraycollection by Nobody: 9:18am On Dec 07, 2012 |
No PHP5 Developers here ?? |
Re: Trivial Question Csv/arraycollection by Nobody: 3:06pm On Dec 16, 2012 |
Hey Guys, just thot i share it not sure if anyone interested, but i used the Code from a git i saw, since it makes no sense writing what someone has already done for people to clone, https://github.com/kurijov/php-array-collection Its not the exact thing i needed but it worked anyway. 1 Like |
(1) (Reply)
How To Succeed As A Developer/designer / Which Is The Best Online Learning Management Software? / Free Web Hosting On Listmasta.
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |