f



php and xml

hi,

this is a bit of an advice thing.
iv just finished a degree in multimedia, where i learned the usuals...
html
flash
director
javascript

i also learned php and i have been told that i should get to grips with xml
as this combination
is verry useful

so iv been messing arround with xml for the past couple of days trying to
figure out how the two would work together.

i just cant grasp the idea..

on thought i have had is that you could use php with a database to generate
xml but surely that would not be parsed as xml as it would have the .php
extension..

as i say im strugling to get this one?

any ideas or url's

cheers

Greg Brant


0
7/8/2003 7:56:30 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

5 Replies
622 Views

Similar Articles

[PageSpeed] 6

> so iv been messing arround with xml for the past couple of days trying to
> figure out how the two would work together.

what about xsl-t?

s


-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
0
moin666 (5)
7/8/2003 9:08:46 PM
Yes, the data going between a web service and its client app is XML. In
fact, I'm working on some stuff now using NuSOAP (a php class file on the
server) and a vb.net client. Works very well, even though nusoap is still
sortof in its infancy.

> In web development, XML may be used in (at least) two ways :
> - in web services protocols (?) like XML-RPC
> - as a way to store content, which may later be parsed and transformed
> into (x)html. BTW, xhtml is more or less html 4 rewritten in valid XML.


0
bob185 (469)
7/9/2003 10:07:26 AM
steffen horst <moin666@email.com> wrote in message news:<oprr0fowea822tll@news.t-online.de>...
> > so iv been messing arround with xml for the past couple of days trying to
> > figure out how the two would work together.
> 
> what about xsl-t?
> 
> s

I am currently developing a web application which uses PHP to create
XML files from a MySQL database, then uses XSL transformations to
create HTML files. This completely separates the presentation layer
from the business layer. Take a look at the following articles for
more details:

http://www.tonymarston.net/php-mysql/domxml.html - Using PHP's DOM XML
functions to create XML files from SQL data

http://www.tonymarston.net/php-mysql/sablotron.html - Using PHP's
Sablotron extension to perform XSL Transformations

Tony Marston
http://www.tonymarston.net
0
tony4074 (115)
7/9/2003 10:41:06 AM
hi

>> what about xsl-t?
> I am currently developing a web application which uses PHP to create
> XML files from a MySQL database, then uses XSL transformations to
> create HTML files. This completely separates the presentation layer
> from the business layer. Take a look at the following articles for
> more details:

i save reviews of records in xml-files. to transform these files into valid 
html i'm using sablotron too. that's very interesting, even if there's no 
other useful format to transform these xml-files to.

s


-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
0
moin666 (5)
7/9/2003 12:01:25 PM
in article vgm8fgj9hkb683@corp.supernews.com, greg brant at
greg_brant@yahoo.co.uk wrote on 8/7/03 8:56 pm:

> hi,
> 
> this is a bit of an advice thing.
> iv just finished a degree in multimedia, where i learned the usuals...
> html
> flash
> director
> javascript
> 
> i also learned php and i have been told that i should get to grips with xml
> as this combination
> is verry useful
> 
> so iv been messing arround with xml for the past couple of days trying to
> figure out how the two would work together.
> 
> i just cant grasp the idea..
> 
> on thought i have had is that you could use php with a database to generate
> xml but surely that would not be parsed as xml as it would have the .php
> extension..
> 
> as i say im strugling to get this one?
> 
> any ideas or url's
> 
> cheers
> 
> Greg Brant
> 
> 
Hi Greg

The Extension is not relevant as far as XML is concerned you could echo all
the constituent parts out in PHP and it will be parsed as XML provided you
create well formed XML and declare it as XML in the first line of code. I
did just this before I realised the power of the PHP XML DOM

XML is a great way to get data sets into Flash

EG In flash
Create new XML object
Load a Dynamically Created XML doc (from PHP or jsp or ASP or anything)
Once Loaded you can use the DOM as the Dynamic element of your flash piece.


Richard



0
7/10/2003 8:53:35 PM
Reply:

Similar Artilces:

PHP/XML (or PHP/MySQL) CMS
I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for managing a large corporate website with a lot of different information. I have found some CMS, but they are just not good enough. Can you recommend one ? thanks in advance. Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > try www.mamboserver.com/ imho top-notch reg. sh -- "The goal of Computer Science is to build something that will last at least until we've finished building it." -- unknown Stefan Hegenbart wrote: >> I have found some CMS, but they are just not good enough. >> >> Can you recommend one ? >> > > try www.mamboserver.com/ > imho top-notch Or if you need something really mighty: www.typo3.org Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > > From - Thu ezPublish: http://www.ez.no/ ...

PHP Training Institute In Delhi, Live Projects on PHP. Short Term PHP Courses, PHP Scripts, PHP Training with Live Projects.
Vserve Global offers short term PHP: Hypertext Preprocessor Training Course, which is a widely used, general-purpose scripting language that was originally designed for web development, to produce dynamic web pages. It can be embedded into HTML and generally runs on a web server, which needs to be configured to process PHP code and create web page content from it. It can be deployed on most web servers and on almost every operating system and platform free of charge.PHP is installed on over 20 million websites and 1 million web servers. TOPICS:- >> Core PHP Language >> HTML, Cascad...

PHP within PHP...
I took over the support of a website that is set up something like this inside one of the pages: include_once("header.php"); <?php //to get the content of the page they do this: $content = mysql_query("select content etc...); echo $content; ?> include_once("footer.php"); I am having problems evaluating any php that is used in the mysql content. Is there a way to get the mysql withing the mysql to run? Thank you for your time, Mandragon On Sep 17, 12:56 pm, Mandrago...@gmail.com wrote: > I took over the support of a website that is set up something like > this inside one of the pages: > > include_once("header.php"); > > <?php > //to get the content of the page they do this: > $content = mysql_query("select content etc...); > > echo $content; > ?> > > include_once("footer.php"); > > I am having problems evaluating any php that is used in the mysql > content. Is there a way to get the mysql withing the mysql to run? > > Thank you for your time, > > Mandragon Sorry, The question should read: "Is there a way to get the php withing the echo $htmlcontent to run?" Of course you are, $content is a resource. The MySQL Query resource. try this: $content = mysql_query('bla bla bla'); while ($row = mysql_fetch_assoc($content)) { $result[] = $row; } $content = $result; Now you can use $content ;). In answer to your edit... eval($co...

php outside php (?)
Sounds weird, i know. What i want/wonder is the following: PHP can do the next: <?php if($foo == 'bar') { ?> Ow yeah, foo is bar! <?php }; ?> But how can i do the following: <?php $foo= ?> this is what foo looks like. <?php }; ?> This way i could edit the content of $foo in DW's design-view. I hope it's clear enough for you all to understand... Greetings frizzle. frizzle wrote: > But how can i do the following: > > <?php > > $foo= > > ?> > this is what foo looks like. > <?php > > }; > > ?> > > This way i could edit the content of $foo in DW's design-view. > I hope it's clear enough for you all to understand... <?php ob_start(); ?> this is what foo looks like. <?php $foo=ob_get_clean(); ?> -- Justin Koivisto - justin@koivi.com http://koivi.com Wow, little late on the reply, but i still wanted to thank you for your help. This is exactly what i meant, and it works great! :D Thanks again. ...

php to php obj
Hi All, Is there any tool to convert the .php files into its object files in deploying the files to other's server like java classes are deployed? Thanks in advance --AR John7481 <arjohn7481@hotmail.com> wrote or quoted: > Is there any tool to convert the .php files into its object files in > deploying the files to other's server like java classes are deployed? To what end? Do you want a PHP obfuscator? They tend not to be needed - since the code remains on the server. Do you want a PHP squeezer? Again - since PHP remains on the server that is of reduced importance. PHP obfuscators and squeezers are out there - but what exactly are you looking for? -- __________ |im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply. With total disregard for any kind of safety measures Tim Tyler <tim@tt1lock.org> leapt forth and uttered: > John7481 <arjohn7481@hotmail.com> wrote or quoted: > >> Is there any tool to convert the .php files into its object >> files in deploying the files to other's server like java >> classes are deployed? > > To what end? > > Do you want a PHP obfuscator? They tend not to be needed - > since the code remains on the server. > > Do you want a PHP squeezer? Again - since PHP remains on the > server that is of reduced importance. > > PHP obfuscators and squeezers are out there - but what exactly > are you looking for? I think he'...

Best PHP Training | PHP Development Training | PHP Training Institute
Tops Technologies provides php and mysql certification courses in ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training with MySQL is an introductory course in the PHP and MySQL technology. Mysql and php training course, php for beginners, sql training courses, PHP Training courses, php courses, mysql training courses, php mysql course. For More Details :- http://www.tops-int.com ...

PHP games to learn PHP
Hi, I am learning PHP, but it can be kind of boring. Are there any games where you use PHP programming to play the game? This way you learn how to use PHP and it is fun. Does anybody know? Nick "Nick Mudge" wrote > I am learning PHP, but it can be kind of boring. Are there any games where > you use PHP programming to play the game? This way you learn how to use > PHP and it is fun. Does anybody know? Yes. Write something (a game, for example) in PHP. To make it even more entertaining, you could add a touch of javascript. Ivo "Ivo" <no@thank.you> wrote in message news:40cc70fe$0$62706$ee9da40f@news.wanadoo.nl... > "Nick Mudge" wrote > > I am learning PHP, but it can be kind of boring. Are there any games where > > you use PHP programming to play the game? This way you learn how to use > > PHP and it is fun. Does anybody know? > > Yes. Write something (a game, for example) in PHP. To make it even more > entertaining, you could add a touch of javascript. > Ivo Since all games are input, output and state engines, the PHP bit is limited to the latter. You get to do the input/output in something else (browsers, JScript, etc) and practise doing the state engine code in PHP. Something like an old-style play-by-mail is perfect. Witness something like http://www.nationstates.net/cgi-bin/index.cgi for ideas that do that. Garp Garp wrote: > "Ivo" <no@thank.you> wrote in mess...

Send array from php to php
HI every one I' try to send array from web page to php file but no data are show I'm using session to store data and this is my code //////////////////////////////////////////////////////////////////////// $data = $cart_items; session_register('data'); foreach ($cart_items as $cart_item) { echo "<tr>"; echo " <td><span class='style2'>".$cart_item->name."</span></td>"; echo " <td><span class='style2'>".$cart_item->description."</ span></td>"; echo " <td><span class='style2'>".$cart_item->price." S.R.</span></ td>"; echo " <td><span class='style2'>".$cart_item->quantity."</span></ td>"; echo " <td><span class='style2'>".$cart_item->price * $cart_item- >quantity."</span></td>"; echo " <td><span class='style4'><a href='order.php?action=del&id=". $cart_item->object_id."'>[del]</a></span></td>"; echo "</tr>"; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ and this is my php code to get the data //////////////////////////////////////////////////////// <?php foreach ($data as $item) { echo "<tr>"; print " &l...

Tutorial on php (or learning php)
I need to learn php and MySQL quickly to support an app. Realizing experience is the best teacher, and this takes time, does anyone ahve any recommendations on: books tutorials web sites samples to help me get going? Thanks. Hugh Williams and David Lane have written a book called "Web Database Applications with PHP and MySQL'' which you can obtain from Amazon at http://www.amazon.com/exec/obidos/ASIN/0596000413/hughwilliams-20/103-0647779-6796618. This book has its own website at http://www.webdatabasebook.com/. You can also download the code and install it locally. HTH. -- Tony Marston http://www.tonymarston.net "JA" <JAlbert@Yahoo.Com> wrote in message news:urjc80tlmfdmd0ha7ed017j1mj580ha167@4ax.com... > I need to learn php and MySQL quickly to support an app. Realizing > experience is the best teacher, and this takes time, does anyone ahve > any recommendations on: > > books > tutorials > web sites > samples > > to help me get going? > > Thanks. JA wrote: > I need to learn php and MySQL quickly to support an app. Realizing > experience is the best teacher, and this takes time, does anyone ahve > any recommendations on: > > books > tutorials > web sites > samples > > to help me get going? > > Thanks. PHP.net really is good, it has references for all the instructions, and the manual is actually pretty good for beginners. JA wrote: > > I need to l...

php://memory and php://temp
http://php.net/manual/en/wrappers.php.php per the documentation: php://memory and php://temp are both listed under "Allows Appending" what am I missing / what's the point? They only seem to work with read/write modes such as fopen('php://memory','rw'); closing the handle, or trying to open another handle without closing the first essentially erase the contents... so what's the point of fopen('php://memory','a') ? you'll a) be appending nothing, b) no way to read what you just wrote? sure would be nice if you could $fh = fopen('php://memory', 'w'); fwrite($fh, 'test string'); fclose($fh); $fh = fopen('php://memory', 'r'); $result = fgets($fh,2048); fclose($fh); echo $result; On 10/12/2010 9:44 PM, BKDotCom wrote: > http://php.net/manual/en/wrappers.php.php > per the documentation: php://memory and php://temp are both listed > under "Allows Appending" > > what am I missing / what's the point? > > They only seem to work with read/write modes such as > fopen('php://memory','rw'); > > closing the handle, or trying to open another handle without closing > the first essentially erase the contents... so what's the point of > fopen('php://memory','a') ? > you'll > a) be appending nothing, > b) no way to read what you just wrote? > > sure would be nice if you could > > $fh = ...

Parsing XML with PHP
I am not really sure how to parse files with PHP XML other than DOM XML. Unfortunetely, I have run into a few problems with size and was told that for the type of parsing I am doing I would be better using event driven parsing like SAX. Below I have a simple example of XML similar (although much much smaller) to the one I am using for real. XML: <?xml... <root> <name age="25">Martyn</name> <name age="24">Neil</name> <name age="24">Robbie</name> </root> All I want to do is to output them as: Martyn (25) Neil (24) Robbie (24) How would I do this uisng something like SAX / EXPAT? I found tutorials but didnt really understand them enough to know if I was looking up the correct thing. Any help would be much appreciated. Cheers Burnsy The XML extension to php implements expat. The manual has a very straight forward examples. http://ie2.php.net/xml But if you want a wrapper: I like the xml classes found here http://phpxmlclasses.sourceforge.net/. For something simple like this check out class_path_parser. There is an example there as well. It's kinda old now so some of the functions may have depreciated. But I suppose the pear xml package (http://pear.php.net/manual/en/package.xml.xml-parser.php) would be more up to date. ...

PHP with Indian PHP Developers
Dear all, If you want to make a PHP web application, or need to <a href="http:// www.virtueinfo.com/php-developers/hire-php-programmers-developers-india.htm">Hire PHP Developer</a>contact a leading <a href="http://www.virtueinfo.com/ php-developers/php-web-development.htm"> PHP Web Development Compnay</ a> <a href="http://www.virtueinfo.com/php-developers/php-web-programming- php-developers-india.htm">Offshore PHP web development India</a> On Thu, 25 Feb 2010 01:37:02 -0800 (PST), Virtue Info wrote: > Dear all, > > > If you want to make a PHP web application, or need to <a href="http:// > www.example.com/php-developers/hire-php-programmers-developers-india.htm">Hire > PHP Developer</a>contact a leading <a href="http://www.example.com/ > php-developers/php-web-development.htm"> PHP Web Development Compnay</ > a> > > ><a href="http://www.example.com/php-developers/php-web-programming- > php-developers-india.htm">Offshore PHP web development India</a> > Third time's the charm? Not exactly a ringing endorsement of the skills you've got available or your testing method reliablity... -- 12. One of my advisors will be an average five-year-old child. Any flaws in my plan that he is able to spot will be corrected before implementation. --Peter Anspach's list of things to do as an ...

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my .php files. For example, if I type >"php phpinfo.php" , this works fine on my system. > >If I put the phpinfo.php file is in /var/www/html and I try to access >it through the browser, I get the content of the file and not the >execution of the file. Instead of display the info of PHP, I got the >text of the file as: > ><?php > phpinfo(); >?> > > >Why? >Thanks Do you have a webserver such as Apache running on the machine where you expect this to happen? Because it's the webserver, not the browser, that needs to know about php. The browser only does html. Margaret -- (To mail me, please change .not.invalid to .net, first. Apologies for the inconvenience.) "Phong Ho" wrote: > I have this problem with PHP that someone might be able to help. > > With CLI, I am able to execute my .php files. For exam...

PHP 4 and PHP 5
What is main difference between PHP 4 and PHP 5? Is possible to use object programming apporach with PHP4? Is possible to use Stored Procedures in Oracle with PHP4? Where I can get more informations? Thanks in advance "ablyplus" <ablyplus@yahoo.com> wrote in message news:cr5n6g$5bp$1@ls219.htnet.hr... > What is main difference between PHP 4 and PHP 5? take a look at http://www.zend.com/php5/ > Is possible to use object programming apporach with PHP4? Yes. The new features in PHP 5 are mainly cosmetic (e.g. visibility). With PHP 4 you can define classes with methods, properties and constructors. You can create objects from these classes at runtime. You do not *need* PHP 5 to write object oriented code with PHP. > Is possible to use Stored Procedures in Oracle with PHP4? Read the manual. take a looki at http://www.php.net/manual/en/ref.oci8.php at scroll down to example 2. > Where I can get more informations? Looking for it might be a start. > Thanks in advance You're welcome. -- Tony Marston http://www.tonymarston.net "ablyplus" <ablyplus@yahoo.com> wrote in message news:cr5n6g$5bp$1@ls219.htnet.hr... > What is main difference between PHP 4 and PHP 5? Much improved OO, and the odd incompatibility. The only noticeble one is that array_merge must be given 2 arrays, you can just chuck in a simple variable and expect it to be merged with an array. It chucks a warning I believe, and still does it...

Does PHP need the .php extension ?
Hi guys, When I use PHP I give my file the .php extension. I always wondered if it could be an .htm page with a <script> block that the PHP resides in, the same way you would do JavaScript. If you can do it that way are there any benifits to that method ? Take care, Cyrus "Cyrus D." <satan@invalid.org> writes: > Hi guys, > > When I use PHP I give my file the .php extension. I always wondered if it > could be an .htm page with a <script> block that the PHP resides in, the > same way you would do JavaScript. If you can do it that way are there any > benifits to that method ? > > Take care, > Cyrus > > Right now you probably have a directive like this in your httpd.conf file (or your ISP does). AddType application/x-httpd-php .php4 .php .php3 .inc .inf .phtml It identifies the extensions which should be processed by the php interpreter before output is sent to the browser. I believe you can also include this directive in a .htaccess file in your area and add .htm to the list. This would send all your files throught the interpreter and those that do not contain PHP code would just be passed through.... You mention Javascript, but that is a bit different. The interpretation of that happens at your browser -- all the PHP work is done at the server. Hope this helps. -- John __________________________________________________________________...

Php constants in php.ini
I am trying to set user_agent = PHP_VERSION in php.ini. In my php.ini the instructions say that you can use constants in the php.ini file. The only constants I can get to work, though, are the error level constants like E_ALL, E_ERROR, E_WARNING, etc., ... Is anyone aware of some sort of trick to getting others to work? (I was thinking it would be nice to have the user agent string used by my Php scripts to use PHP_VERSION in the string.) -- ***************************** Chuck Anderson • Boulder, CO http://www.CycleTourist.com Integrity is obvious. The lack of it is common. ***************************** ...

PHP XML
I am fairly familiar with PHP and MYSQL and I know a little about XML. I would like to know if it is possible to do queries on XML similar to the way that you do queries on MYSQL and then use the results. An example of a simple PHP/MYSQL setup. <?php $user="username"; $host="sqlserver"; $password="password"; $database="database"; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to the server"); $db = mysql_select_db($database,$connection) or die ("Couldn't connect to the server"); $query = "SELECT * FROM database WHERE(Criteria)"; $result = mysql_query($query) or die ("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { extract($row); echo"Set of instructions to carry out for each row in the result"; } ?> The question is, is it possible to do similar things with PHP/XML? Lets say that I have an XML file located at a certain URL and I want to run a query on it and use the results. 1. Is it possible? 2. What is the easiest way to do it? 3. How would I translate the above code to work with XML? 4. Is ther resource on the web on how to structure the queries? Any help is much appreciated. Rgds Joe On Thu, 13 Nov 2003 15:...

php notification through php sdk
Hi there I want to build a e-commerce website similar to wish.com and I have chosen opencast as my framework of choice. Now wish has a feature that when you save a product in wish and if you are logged in with Facebook or gmail all of your friends will get a notification that your friends has saved a item on wish. I want a similar feature on my site Now I know Facebook provide a sdk JavaScript and php and wish might be using something similar but I am using open cart can I open home page or product page in the sdk Thanks On 3/20/2015 7:30 AM, apoorv.kanungo@gmail.com wrote: &g...

Php into XML
Heelo everybody. I am using XML and XSL to analyse a text. Now, I am trying to integrate php into the XML code, in order to make the XML page dynamic. Yet the parser doesn't even read the php code embedded in the xml page. Here is the beginning of my XML page, inf-dev.xml ----- ?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE inferno SYSTEM "file:/Users/davidebenini/Documents/Universita%CC%80/Dottorato/inferno/inferno.dtd"> <?xml-stylesheet type="text/xsl" href="inf-dev.xslt"?> <inferno> <filtro>FILTRO: <?php echo "Filtro passsato in php"; ?>-</filtro> <canto> <n>1</n> <passo> <vv>1</vv> <dante> <v>Nel mezzo del cammin di nostra vita</v> </dante> <carson> <v>Halfway through the story of my life</v> </carson> <nota> <n>Carson introduce story</n> </nota> </passo> <passo> <vv>14</vv> <dante> <v>l� dove terminava quella valle</v> </dante> <carson> <v>hill; here, thre valley formed a cul-de-sac</v> </carson> ...

about php lang
plz told me that what is the php lang., how does it works and where it used. mani <msb.jod@gmail.com> wrote: > plz told me that what is the php lang., how does it works and where it > used. There is a good explanation at http://lmgtfy.com/?q=php regards Henrik -- The address in the header is only to prevent spam. My real address is: hc3(at)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost On 16 Jun 2009, mani <msb.jod@gmail.com> wrote: > plz told me that what is the php lang., how does it works and > where it used. Lulz. <http://www.google.com/> -- ~Curtis Anonymous (1984 IOCCC winner): int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\ o, world!\n",'/'/'/'));}read(j,i,p){write(j/p+p,i---j,i/i);} mani schreef: > plz told me that what is the php lang., how does it works and where it > used. http://en.wikipedia.org/wiki/Php Tip: If you want to learn something about a subject totally new to you, try wikipedia for a reasonable intro. Regards, Erwin Moller -- "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." -- C.A.R. Hoare ...

XML PHP
I am fairly familiar with PHP and MYSQL and I know a little about XML. I would like to know if it is possible to do queries on XML similar to the way that you do queries on MYSQL and then use the results. An example of a simple PHP/MYSQL setup. <?php $user="username"; $host="sqlserver"; $password="password"; $database="database"; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to the server"); $db = mysql_select_db($database,$connection) or die ("Couldn't connect to the server"); $query = "SELECT * FROM database WHERE(Criteria)"; $result = mysql_query($query) or die ("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { extract($row); echo"Set of instructions to carry out for each row in the result"; } ?> The question is, is it possible to do similar things with PHP/XML? Lets say that I have an XML file located at a certain URL and I want to run a query on it and use the results. 1. Is it possible? 2. What is the easiest way to do it? 3. How would I translate the above code to work with XML? 4. Is ther resource on the web on how to structure the queries? Any help is much appreciated. Rgds Joe On Thu, 13 Nov 2003 15:08...

PHP with XML
I have an XML File like: <xml version=1.0> <wholecontent> <group> <name> Goldking </name> <description>Made of Gold. </descripton> </group> <group> <name> SilverKing </name> <description> Made of Silver. </descripton> </group> </wholecontent> </xml> I wish to read 1) All the Name and to be displayed. 2) Get the description for a particular name. Can we use PHP to raed this data? How it could be acheived? This Qn has raised to learn / understand XML with PHP.. Thanks in Advance.. Regards, Goldking You have also posted an unapprehensible version of this question in "Professional PHP Developers". You should really check out the SimpleXML extension. Yannis Rizos wrote: > You have also posted an unapprehensible version of this question in > "Professional PHP Developers". You should really check out the > SimpleXML extension. > Or look for clsParseXML on the web. On Tue, 12 Sep 2006 05:09:14 -0700, Goldking wrote: > I have an XML File like: > <xml version=1.0> > <wholecontent> > <group> > <name> Goldking </name> > <description>Made of Gold. </descripton> > </group> > <group> > <name> SilverKing </name> > ...

why does $_SERVER['PHP_SELF'] say /test.php/test.php for test.php?
I have a PHP script at 127.0.0.1/test.php. It's contents are as follows: <?php echo $_SERVER['PHP_SELF']; ?> And it's output isn't test.php, as I'd expect, or /test.php, but rather, /test.php/test.php. Why? And how do I fix it? El 06/10/2010 6:53, yawnmoth escribi�/wrote: > I have a PHP script at 127.0.0.1/test.php. It's contents are as > follows: > > <?php > echo $_SERVER['PHP_SELF']; > ?> > > And it's output isn't test.php, as I'd expect, or /test.php, but > rather, /test.php/test.php. Why? And how do I fix it? What output do you get if you change it to this? <?php echo '[' . $_SERVER['PHP_SELF'] . ']'; ?> What do your other $_SERVER values look like? <?php print_r($_SERVER); ?> -- -- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programaci�n web: http://borrame.com -- Mi web de humor satinado: http://www.demogracia.com -- On 06/10/10 09:30, "�lvaro G. Vicario" wrote: > El 06/10/2010 6:53, yawnmoth escribi�/wrote: >> I have a PHP script at 127.0.0.1/test.php. It's contents are as >> follows: >> >> <?php >> echo $_SERVER['PHP_SELF']; >> ?> >> >> And it's output isn't test.php, as I'd expect, or /test.php, but >> rather, /test.php/test.php. Why? And how do I fix it? > > What output do you get if you change it ...

Web resources about - php and xml - comp.lang.php

PHP - Wikipedia, the free encyclopedia
.php, .phtml, .php4, .php3, .php5, .phps PHP code can be simply mixed with HTML code, or it can be used in combination with various templating ...

PHP - Wikipedia, the free encyclopedia
.php, .phtml, .php3, .php4, .php5, .phps PHP code may be embedded into HTML code, or it can be used in combination with various web template ...

Chapman PHP Web Services - Home
Chapman PHP Web Services home page.

..:: PHP GROUP ::..
Home Feedback Contact Us Site Map www website 22nd May 2012 Investors & Associates Awards & Achievements PHP Clients Customer Support PHP Services ...

The Complete list of PHP Podcasts, Screencasts, and Video Podcasts.
A complete list of all PHP podcasts, screencasts and video podcasts, aggregated into a single feed. Come explore all the podcasts that the PHP ...

PHP: The Right Way
An easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative PHP tutorials around the Web

Freelance PHP, Freelance PHP Developer, Freelance PHP Programmer, PHP Freelancer, PHP Freelancer India ...
Freelance PHP, Freelance PHP Developer, Freelance PHP Programmer, PHP Freelancer, PHP Freelancer India ...

PHP: Hypertext Preprocessor
... general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want ...

CakePHP: the rapid development php framework. Pages
... are built-in. Translations, database access, caching, validation, authentication, and much more are all built into one of the original PHP MVC ...

PHP Advent 2011
C hristmas is upon us once again, and it’s time to have a look at what’s under the PHP Advent tree. Join us each day as our wonderful authors ...

Resources last updated: 3/24/2016 7:08:16 AM