[plug] PHP talk last night

Simon Scott simon.scott at flexiplan.com
Wed Jul 11 11:49:33 WST 2001


	This is entirely correct

	However, PHP will not only be used to transform into PDF or
whatever, it will also be used for communicating data to a backend (the
backend will listen on a port and receive XML files which contain data, and
then act on them). 

	So I need to parse XML to extract into a database, and also turn
form input into XML. I guess this is easy enough.

	BTW, this 'createoutput' you speak of seems very powerful :) Ill
have a copy, thanks :) hahaha

	Tah bud, I get the gist that what I want to do is entirely possible,
whether it is a good idea or not is another question :)




	From:	Mark Nold <markn at enspace.com> on 11/07/2001 11:16 AM
	Please respond to plug at plug.linux.org.au@SMTP at Exchange
	To:	plug at plug.linux.org.au@SMTP at Exchange
	cc:	 

	Subject:	RE: [plug] PHP talk last night



	Writing the XML is just as hard as writing out HTML.

	The parsing is simple enough to do once you get your head around the
PHP 
	interface. I have some examples lying around on a test machine if
you are 
	interested. I only played with it but havent had a use for it yet.



	What i would suggest is treat XML as just another presentation
method so you 
	should decide on a non XML way of storing/manipulating your data in
PHP.

	I'd probably suggest using a 2d array. So you end up having generic
functions() 
	to retrieve data from you DB (or wherever) then a function that will
output XML 
	or whatever. If $dataset is a 2D Array (or maybe more dimensions, or
maybe an 
	object?) you can easily throw it around and present your data in
anyway you 
	feel (XML is just another presentation format)

	$dataset = getData($sql); // $dataset could be a 2D array full of
all your data 
	plus whatever.

	$xml = createOutput($dataset,"xml");
	$html = createOutput($dataset,"html");
	$pdf = createOutput($dataset,"pdf");

	echo ????


	It's not quite as easy as this as you may need to send headers to
the browser 
	but hopefully this makes sense.

	mn


	PS: The notes should go up soon :)







	Mark Nold
	markn at enspace.com
	Senior Consultant

	Change is inevitable, except from vending machines.






**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



More information about the plug mailing list