Search found 22 matches
- Mon Jul 16, 2007 11:45 am
- Forum: PHP - Code
- Topic: Quick question on checkboxes
- Replies: 4
- Views: 350
Quick question on checkboxes
Is there a need to use the 'value' attribute for checkboxes? For example, if I have something like this: <input name="checkbox" type="checkbox" checked="checked"> Is there a need for the 'value' attribute, since the POST array will have the 'name' if it was checked on p...
- Wed May 30, 2007 11:27 am
- Forum: PHP - Code
- Topic: Quick question: Adding children in XML
- Replies: 8
- Views: 2666
- Wed May 30, 2007 9:47 am
- Forum: PHP - Code
- Topic: Quick question: Adding children in XML
- Replies: 8
- Views: 2666
Ok, we're getting closer. Now, what if no other nodes around it exist, say we want to add <xyz>-><bbb>-><ccc>-><new_node>? Now, I am not sure that the append child will work since there is only one 'common' node (<xyz>)... <xyz> <abc> <def></def> <NEW_NODE></NEW_NODE> <sss></sss> </abc> <bbb> <ccc> ...
- Wed May 30, 2007 9:27 am
- Forum: PHP - Code
- Topic: Quick question: Adding children in XML
- Replies: 8
- Views: 2666
- Wed May 30, 2007 9:08 am
- Forum: PHP - Code
- Topic: Quick question: Adding children in XML
- Replies: 8
- Views: 2666
- Tue May 29, 2007 5:28 pm
- Forum: PHP - Code
- Topic: Quick question: Adding children in XML
- Replies: 8
- Views: 2666
Quick question: Adding children in XML
I want my code to add children within my xml file if the queried tag does not exist, but I can't figure how to add it into the proper section within the nodes. For example: $newText = 'New Text'; $entries = $this->getQuery($query); // does a query using a DOMXPath object $curTag = $entries->item(0);...
- Tue May 29, 2007 3:42 pm
- Forum: Miscellaneous
- Topic: XML - How to print all children nodes?
- Replies: 8
- Views: 3304
Thanks for the help. I found my last answer on http://www.w3schools.com/xpath/xpath_syntax.asp
All I have to do is something like:
All I have to do is something like:
Code: Select all
query(//xyz[@id='1'])- Fri May 25, 2007 12:56 pm
- Forum: Miscellaneous
- Topic: XML - How to print all children nodes?
- Replies: 8
- Views: 3304
- Fri May 25, 2007 9:59 am
- Forum: Miscellaneous
- Topic: XML - How to print all children nodes?
- Replies: 8
- Views: 3304
- Thu May 24, 2007 5:23 pm
- Forum: Miscellaneous
- Topic: XML - How to print all children nodes?
- Replies: 8
- Views: 3304
XML - How to print all children nodes?
I am trying to print all children nodes of a parent node, but I cannot figure out how... This is what I am doing: <server> <xyz> ... </xyz> <zyx> ... </zyx> <abc> ... </abc> </server> $_doc = new DOMDocument(); $_doc->load(SERVER_PATH); $_serverTag = $_doc->getElementsByTagName("server"); ...
- Wed May 09, 2007 2:10 pm
- Forum: PHP - Code
- Topic: How is this possible? I am returning false, but it 'unset'
- Replies: 40
- Views: 5792
- Wed May 09, 2007 10:56 am
- Forum: PHP - Code
- Topic: And-equals doesnt retain boolean property, what will?
- Replies: 1
- Views: 641
And-equals doesnt retain boolean property, what will?
This is sort of in another post, but since it has somewhat become cluttered, I am starting this new one: I noticed that an "&=" or "|=" on a Boolean value will not retain its Boolean type. For example if I do something like this: $a = false; $b = false; $a &= $b; if ($a =...
- Wed May 09, 2007 10:49 am
- Forum: PHP - Code
- Topic: How is this possible? I am returning false, but it 'unset'
- Replies: 40
- Views: 5792
- Tue May 08, 2007 11:48 pm
- Forum: PHP - Code
- Topic: How is this possible? I am returning false, but it 'unset'
- Replies: 40
- Views: 5792
I see what you are doing, but why you are doing it is beyond me. why are you wasting your time doing it this way anyways? I mean, defining a variable to be the name of a function, to just call the variable later as the function name is very redundant and unnecessary to me. Not to mention the next c...
- Tue May 08, 2007 5:10 pm
- Forum: PHP - Code
- Topic: How is this possible? I am returning false, but it 'unset'
- Replies: 40
- Views: 5792