Re: xml parser und bestehende variablen - multilinguale app
| From: | Evan Nemerson | Date: | Sun, 23 Nov 2003 22:07:38 +0000 |
| Subject: | Re: xml parser und bestehende variablen - multilinguale app | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170735@lists.php.net to get a copy of this message | ||
How are you parsing the XML? If you read the values into a PHP variable, and
you're confident in the contents of the string, you could use eval()... Also,
preg_replace_callback() may be useful.
If you provide a bit more example, it may be more easy to help. In any case, I
think your variable variables are a bit out of whack. Read
http://us3.php.net/manual/en/language.variables.variable.php
That may be your problem if it's outputting something like 'beispiel ', and
not 'beispiel $no'. Try doing error_reporting(E_ALL) and see what happens.
-------------
Babelfish says...
(my reply:)
Wie analysieren Sie das XML? Wenn Sie die Werte in eine PHP Variable lesen und
Sie im Inhalt der Zeichenkette überzeugt sind, konnten Sie eval() benutzen...
Auch preg_replace_callback() kann nützlich sein.
Wenn Sie eine Spitze mehr Beispiel zur Verfügung stellen, zu helfen kann
einfacher sein. In jedem möglichem Fall denke ich, daß Ihre variablen
Variablen eine Spitze aus whack heraus sind. Lesen Sie
http://us3.php.net/manual/en/language.variables.variable.php
Das kann Ihr Problem, wenn es etwas wie ' beispiel ' ausgibt, und nicht '
beispiel $no'. Versuchen Sie, error_reporting(E_ALL) zu tun und sehen Sie,
was geschieht.
(orignal message:)
Hello together,
I would like to offer gladly my existing app in several languages. In addition
I have me xml more parser package installed a which in the situation am out
xml files of contents to be inserted.
To the Bsp xml the file looks in such a way:
<en>example</en>
<de>beispiel</de>
Functions so far. The PROBLEM however is, if I have a varible within this text
and not everything to carve up liked, does not parst php these contents.
Example: $$no = 10;
<en>example ' $no.'</en>
<de>beispiel ' $no.'</en>
In this case one gets the contents of the variable not indicated, but einfahc
the ' $no.' stringer.
What there can one do? I can not possibly all write the text split up. That
out page into one xml file is completely practically above all if it several
languages become.
Here does someone have a good taps?
thank you in advance,
Andy
--
Evan Nemerson
evan@coeus-group.com
http://coeusgroup.com/en
--
"If there is no higher reason--and there is none--then my own reason must be
the supreme judge of my life."
-Leo Nikolaevich Tolstoy