Re: [PHP] Re: DOM XML and php

2004-03-15 Thread Lucian COZMA
from variable not open xml file with using DOMXML. tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Friday, March 12, 2004 1:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: DOM XML and php True, but it does much more than that. It also provides xslt

Re: [PHP] Re: DOM XML and php

2004-03-12 Thread Lucian COZMA
XML docs from the beginning and manipulate xml data like add or remove xml elements. I hope to help you. tassos -Original Message- From: Lucian COZMA [mailto:[EMAIL PROTECTED] Sent: Thursday, March 11, 2004 5:31 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: DOM XML and php I have

[PHP] Re: DOM XML and php

2004-03-11 Thread Lucian COZMA
functions section. Regards, Lucian COZMA Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I face a problem. I have a php script and I send a xml request to a server. After I receive xml data but I have this data to an php string variable. How to create a xml dom

Re: [PHP] Re: DOM XML and php

2004-03-11 Thread Lucian COZMA
do it. Regards, Lucian COZMA @ InterAKT Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for your reply but I have another problem I have an xml string if I use this code ? header(Content-Type: text/xml); echo $xml_string; ? I can see the xml tree but I cannot

Re: [PHP] Re: DOM XML and php

2004-03-11 Thread Lucian COZMA
If you really want to use Sablotron (although I tried it I not liked it as much as DOMXML, gimme a sign, and I'll debug you. Regards, Lucian COZMA @ InterAKT Tassos T [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for your reply but I have another problem I have an xml

Re: [PHP] Re: DOM XML and php

2004-03-11 Thread Lucian COZMA
into; print the \$result variable the reason is that . xslt_error($xh) . print and the error code is . xslt_errno($xh); } xslt_free($xh); ?Lucian COZMA Lucian Cozma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you really want to use Sablotron (although I tried it I not liked

Re: [PHP] Re: DOM XML and php

2004-03-11 Thread Lucian COZMA
this because DOMXML is faster and more reliable than Sablotron (my opinion after using extesively both of them), and both are extensions, that you have to install, not something native that comes directly embeded into PHP. Thanks, Lucian COZMA Tassos T [EMAIL PROTECTED] wrote in message news

[PHP] Re: merge array

2004-03-03 Thread Lucian Cozma
That should do it: Max [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I have two arrays as follows: $x = array(3,4,6,8); $y = array(10,20,40,10); I need these arrays could be merged with '0' in between. Result expected : $x = array(1,2,3,4,5,6,7,8); $y =

[PHP] Re: merge array

2004-03-03 Thread Lucian Cozma
That should do it: ?php $x = array(3,4,6,8); $y = array(10,20,40,10); $tmp = $x; rsort($tmp); $n = $tmp[0]; $newArr = array(); $newArr = array_fill(0, $n-1, 0); for($i=0;$icount($x);$i++) { $newArr[$x[$i]-1] = $y[$i]; } print_r($newArr); ? Max [EMAIL PROTECTED] wrote in message news:[EMAIL

[PHP] Re: Character Encoding Problem

2004-02-23 Thread Lucian Cozma
Try multibyte functions (http://www.php.net/manual/en/ref.mbstring.php): mb_decode_numericentity mb_encode_numericentity mb_convert_encoding See below: ?php function n_to_c($str) { return mb_decode_numericentity($str, array(0x0, 0x2, 0, 0x), 'UTF-8'); } function c_to_n($strt) { return

[PHP] Re: XSLT in php v5 beta 4

2004-02-23 Thread Lucian Cozma
Try: http://slides.bitflux.ch/ http://slides.bitflux.ch/phpug2004_1/ You could also get the CVS version and check out the source code. It was the best way for me to find undocumented features. There are also samples and articles, but unfortunately you have to dig for them all over the net

[PHP] Re: date

2004-02-20 Thread Lucian Cozma
date('Y-m-d', time()- 60*60*24); You could also use mktime. Regards, Lucian Madcat [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi there how do i make php give me yesterday's date? i tried date(Y-m-d)-1 but if today would be the 1st of july (2004-07-01), yesterday would be

[PHP] Re: XSLT in php v5 beta 4

2004-02-20 Thread Lucian Cozma
in the configure line above. Thanks again for you response I really appreciate it. I will give the DOM XSLT a try this weekend. Steve Lucian Cozma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I think your problems comes from configuring php with domxml instead of xslt lib

[PHP] Re: XSLT in php v5 beta 4

2004-02-19 Thread Lucian Cozma
I think your problems comes from configuring php with domxml instead of xslt lib ( that requires sablotron). You can use domxml's xslt transformations. I actually recomend it. It's faster and in my opinion more flexible and reliable. (see http://www.php.net/manual/en/ref.domxml.php for more info )

[PHP] Re: tourico

2004-01-30 Thread Lucian Cozma
If you refer to the gilboa/galileo reservation system, I've had a project on it for a Greece-based travel company. It involved XML messaging with the Gilboa server. Lucian COZMA Diana Castillo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone have any experience connecting

[PHP] Re: XML Strategdy

2003-12-11 Thread Lucian Cozma
Try Krysalis (http://www.interakt.ro/products/Krysalis/) if you're trying something more complex. It's a PHP/XML platform. If you want simple stuff (just generate XML's), I recomend doing for yourself a custom class/function for it. Here is a code sample: psql:execute-query connection=krysalis

[PHP] Re: PHP, XML, UTF-8

2003-12-11 Thread Lucian Cozma
Answer: Multi-Byte String Functions. You could take a look at the function: string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding] ) You must have php_mbstring extension enabled in your php.ini file. Regards, Lucian COZMA Russell P Jones [EMAIL PROTECTED] wrote

[PHP] Re: xml parser und bestehende variablen - multilinguale app

2003-11-24 Thread Lucian Cozma
If you want that all the users will be able to help you, please post in English. Lucian Merlin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hallo zusammen, ich möchte gerne meine bestehende app in mehreren Sprachen anbieten. Dazu habe ich mir ein xml parser package installiert

[PHP] Re: file delimited

2003-11-24 Thread Lucian Cozma
array fgetcsv ( resource handle, int length [, string delimiter [, string enclosure]]) PHP manual extract: ?php $row = 1; $handle = fopen (test.csv,r); while ($data = fgetcsv ($handle, 1000, ,)) { $num = count ($data); print p $num fields in line $row: br\n; $row++; for ($c=0; $c

[PHP] Re: free PHP OOP book - Web applications desgin

2003-11-21 Thread Lucian Cozma
If you want customizable layout without changing the logic, try the MVC approach (model-view-control). The best way to do it is to create the data from php in a XML (generate the logic), then create the layout with XSL. Thus, if you want to change the layout, all you have to do is to

Re: [PHP] easy and simple way to read xml into array

2003-11-19 Thread Lucian Cozma
Maybe this will help. I just made it: class XMLParser { var $depth = 0; var $parser; var $text; var $cdata = array(); function XMLParser() { $this-parser = xml_parser_create(); xml_set_object($this-parser, $this); xml_parser_set_option($this-parser,

Re: [PHP] easy and simple way to read xml into array

2003-11-19 Thread Lucian Cozma
The 'sample.xml' file: ?xml version=1.0? root ingrediens no=1 ingrediensnummer1234/ingrediensnummer maengde3,4/maengde enhedkg/enhed /ingrediens ingrediens no=2 ingrediensnummer x=212345/ingrediensnummer maengde3,1/maengde enhedt/enhed /ingrediens /root Victor

Re: [PHP] easy and simple way to read xml into array

2003-11-19 Thread Lucian Cozma
Maybe this will help. Just made it (nedded it myself) and I saw your post. ?php class XMLParser { var $depth = 0; var $parser; var $text; var $cdata = array(); function XMLParser() { $this-parser = xml_parser_create(); xml_set_object($this-parser, $this);

Re: [PHP] easy and simple way to read xml into array

2003-11-19 Thread Lucian Cozma
So what do I need hearing it for ? I just answered the guy (what he needed was help, not punches slaps from wiseguys). Raditha Dissanayake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Well, I've, and I also have to say that the XML-support in PHP lacks any usability… I am

[PHP] Re: greek in php-xml

2003-11-17 Thread Lucian Cozma
. The xml, the xmlparser are set for utf-8 and so are the html pages. I used the code which is in the chm file ... Any ideas? Lucian Cozma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've encountered this problem when developing for a greek company. Do you create a html output

[PHP] Re: Get value between 2 strings

2003-11-17 Thread Lucian Cozma
This should do the trick: $line = I want the value between word ONE and word TWO. Please return it...; preg_match('/ONE(.*)TWO/i', $line, $ret); print_r($ret); Matt Palermo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. I was wondering if anyone knew of a function to get the

[PHP] Re: giving variable value in URL problem

2003-11-17 Thread Lucian Cozma
Try: if (isset($_GET['status']) $_GET['status'] ==0) { echo Trying; } The warning is triggered by the fact that you use a variable that was not previously defined. Check it before use with isset. If in php.ini the value error_reporting = E_ALL, it will output warnings. If you want the

Re: [PHP] Sessions within new windows

2003-11-14 Thread Lucian Cozma
Olinux [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If, as Chris wrote, this is indeed a feature/bug of IE, then it must be configurable somewhere, though I'm lost as to where that might be. Does anyone have any ideas how this could be controlled via IE's settings?

[PHP] Re: greek in php-xml

2003-11-14 Thread Lucian Cozma
I've encountered this problem when developing for a greek company. Do you create a html output from it ? If you do, make sure that you have meta http-equiv=Content-Type content=text/html; CHARSET=utf-8 / in the head tag of the html output. Lucian Pnp [EMAIL PROTECTED] wrote in message