User Profile

Collapse

Profile Sidebar

Collapse
Ahmad Nawaz
Ahmad Nawaz
Last Activity: Jan 17 '11, 06:00 AM
Joined: Dec 23 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to get all elements of a dropdown list into a variable of type array?

    I have a dropdown list which have some elements.
    I want to get all the elements of the dropdown list into a variable of type array.

    Any Idea???
    See more | Go to post

  • but i want to dynamically enclosed the value of attribute(if exist) in "double quotes".

    Because my program will no know the tags of the xml file.\
    I have written the following code but its not working properly. if you can correct this then please tell me.

    Herer is my code


    Code:
    <?php
    $xml = new DOMDocument();
    $xml->recover = true;
    $xml->load('test.xml');
    $node
    ...
    See more | Go to post
    Last edited by Dormilich; Dec 25 '10, 10:21 AM. Reason: please use [CODE] [/CODE] tags when posting code

    Leave a comment:


  • I have found the code for the above issue.
    But now the problem is of attributes.
    suppose i have an xml file like the above and the tag have the attribute name = ahmad. the value of the attribute is not enclosed in "double quotes".
    Now i want a php program to enclose the value of the attribute "name" in "double quotes".
    Any one who can do this???
    See more | Go to post

    Leave a comment:


  • Ahmad Nawaz
    started a topic How to fix errors in XML file using php program?
    in PHP

    How to fix errors in XML file using php program?

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <note>
        <to>Tove</to>
        <from name=ahmad>Jani</from>
        <heading>Reminder
        <body>Don't forget me this weekend!</body>
    </note>

    Above is my xml file which contains two errors.
    1. the attribute value of from tag in not enclosed in "".
    2. heading...
    See more | Go to post
    Last edited by Dormilich; Dec 25 '10, 10:19 AM. Reason: please use [CODE] [/CODE] tags when posting code
No activity results to display
Show More
Working...