[PHP] Converting user input for XML-validation

2007-11-16 Thread Ralph Kutschera
Hallo! I'm having an HTML-form where the user can input anything. With PHP I'm processing the input to XML like what the user has entered Now, if the user enters e.g "< thats a bracket", that gives < thats a bracket which of course does not validate. Is there a standard function in PHP to c

[PHP] Re: Converting user input for XML-validation

2007-11-16 Thread Ralph Kutschera
Thanks a lot for your answers! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting user input for XML-validation

2007-11-16 Thread Ralph Kutschera
Ralph Kutschera wrote: > Is there a standard function in PHP to convert any string for usage with > XML? In the example the string should become "< thats a bracket". I found htmlspecialchars() now. But the question that remains: Is that sufficient for XML? regards, Ral

[PHP] function -> action

2007-08-02 Thread Ralph Kutschera
Hallo! I'm working on a project, where we distinguish between "functions" and "actions" in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word "action" as "function"? E.g.: public function doSomething() { } public action doSomethingElse()

[PHP] Parent Object

2007-08-01 Thread Ralph Kutschera
Hallo! class A { ... } class B extends A { ... $name = get_parent_class($this); // would be "A" ... } This is *not* what I want! class B { ... $name = get_parent_class2($this); // should give "A" ... } class A { ... $b = new B(); ... } This *is* what I want! How can i res