Jump to content

Archived

This topic is now archived and is closed to further replies.

CrimpJiggler

Best way to store and output arrays as HTML

Recommended Posts

I made this script which extracts data from a batch of files, and I'm basically just loading the extracted data into a big multidimensional array. Only issue now is I don't know what to do with the array. I don't feel like making new database tables for the data so instead I converted the array into an XML file, usually I would just use a .xsl file to output the XML file as HTML but I don't know how to do that with CakePHP. The XML file generated by CakePHP is big and ugly like the array:

cfbeba95fff24fb054ae029362235468.png

 

but its so easy to convert arrays into XML with CakePHP, I wanna make use of this feature. What should I do with the XML file? I've seen mention of "XML views" and JSON views but I haven't got my head around what they are yet. I suppose if there was an easy way to convert this XML or array into a database table structure, so it'll automatically create the table and load the data into it, that would be fairly useful. For now though, I need to be able to display this data in a human friendly format, cuz other people need to use this tool. Any tips?

Share this post


Link to post
Share on other sites

So you haven't been able to find a way to insert a

Share this post


Link to post
Share on other sites

I haven't tried yet actually, I haven't even figured out how to view the XML files through the cake routing system. I could add a new rule to routes.php but I'm thinking theres probably already a built in way to style and view XML files.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.