En kontaktapplikation

Den ljusblå applikationen [källkod]

Kontaktapplikation

Dags att ge sig i kast med XML och se hur vi kan använda detta datautbytesformat för att bygga vidare på vår applikation.

Den tutorial som du skall följa hittar du här.

Lägg till kontakt

Lägg till kontakt

Namn
Epost

Tabellen med alla kontakter

contactIdnameemail
1 Johan johan@systemet.se
2 Anna anna@systemet.se
3 Bosse Bosse@systemet.se
4 Johan johan@systemet.se
5 Anna anna@systemet.se
6 Bosse Bosse@systemet.se
7 Östen ö@systemet.se
8 Qwerty q@systemet.se
9 Xerxes x@systemet.se
10

Import

Välj fil att ladda upp

Utbytesformat

Alla kontakter i JSON

{
    "contacts": [
        {
            "contactId": "1",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "2",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "3",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "4",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "5",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "6",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "7",
            "name": "\u00d6sten",
            "email": "\u00f6@systemet.se"
        },
        {
            "contactId": "8",
            "name": "Qwerty",
            "email": "q@systemet.se"
        },
        {
            "contactId": "9",
            "name": "Xerxes",
            "email": "x@systemet.se"
        },
        {
            "contactId": "10",
            "name": "",
            "email": ""
        }
    ]
}

Ladda ner som fil

Alla kontakter i XML

<?xml version="1.0" encoding="UTF-8"?>
<contactList>
  <contact contactId="1">
    <name>Johan</name>
    <email>johan@systemet.se</email>
  </contact>
  <contact contactId="2">
    <name>Anna</name>
    <email>anna@systemet.se</email>
  </contact>
  <contact contactId="3">
    <name>Bosse</name>
    <email>Bosse@systemet.se</email>
  </contact>
  <contact contactId="4">
    <name>Johan</name>
    <email>johan@systemet.se</email>
  </contact>
  <contact contactId="5">
    <name>Anna</name>
    <email>anna@systemet.se</email>
  </contact>
  <contact contactId="6">
    <name>Bosse</name>
    <email>Bosse@systemet.se</email>
  </contact>
  <contact contactId="7">
    <name>Östen</name>
    <email>ö@systemet.se</email>
  </contact>
  <contact contactId="8">
    <name>Qwerty</name>
    <email>q@systemet.se</email>
  </contact>
  <contact contactId="9">
    <name>Xerxes</name>
    <email>x@systemet.se</email>
  </contact>
  <contact contactId="10">
    <name></name>
    <email></email>
  </contact>
</contactList>

Ladda ner som fil

Samtliga variabler

Array
(
    [_GET] => Array
        (
        )

    [_POST] => Array
        (
        )

    [_COOKIE] => Array
        (
        )

    [_FILES] => Array
        (
        )

    [_SERVER] => Array
        (
            [PHPRC] => /storage/configuration/wrappers/83/218483/kursolle.se/php.ini
            [PHP_FCGI_CHILDREN] => 0
            [PATH] => /sbin:/usr/sbin:/bin:/usr/bin
            [PWD] => /storage/configuration/wrappers/83/218483/kursolle.se
            [SHLVL] => 0
            [PHP_FCGI_MAX_REQUESTS] => 5000
            [SCRIPT_NAME] => /application/contact03/index.php
            [REQUEST_URI] => /application/contact03/
            [QUERY_STRING] => 
            [REQUEST_METHOD] => GET
            [SERVER_PROTOCOL] => HTTP/1.1
            [GATEWAY_INTERFACE] => CGI/1.1
            [REMOTE_PORT] => 35292
            [SCRIPT_FILENAME] => /storage/content/83/218483/kursolle.se/public_html/application/contact03/index.php
            [SERVER_ADMIN] => root@localhost
            [DOCUMENT_ROOT] => /storage/content/83/218483/kursolle.se/public_html
            [REMOTE_ADDR] => 54.224.17.157
            [SERVER_PORT] => 80
            [SERVER_ADDR] => 10.160.1.19
            [SERVER_NAME] => kursolle.se
            [SERVER_SOFTWARE] => Apache
            [SERVER_SIGNATURE] => 
            [HTTP_X_FORWARDED_FOR] => 54.224.17.157
            [HTTP_LOCAL_ADDR] => 195.74.38.121
            [HTTP_REMOTE_ADDR] => 54.224.17.157
            [HTTP_CONNECTION] => close
            [HTTP_IF_MODIFIED_SINCE] => Mon, 21 May 2018 16:43:45 GMT
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_USER_AGENT] => CCBot/2.0 (http://commoncrawl.org/faq/)
            [HTTP_ACCEPT_ENCODING] => x-gzip, gzip, deflate
            [HTTP_HOST] => kursolle.se
            [FCGI_ROLE] => RESPONDER
            [PHP_SELF] => /application/contact03/index.php
            [REQUEST_TIME_FLOAT] => 1532345965.173
            [REQUEST_TIME] => 1532345965
        )

    [_REQUEST] => Array
        (
        )

    [_ENV] => Array
        (
        )

    [GLOBALS] => Array
        (
            [_GET] => Array
                (
                )

            [_POST] => Array
                (
                )

            [_COOKIE] => Array
                (
                )

            [_FILES] => Array
                (
                )

            [_SERVER] => Array
                (
                    [PHPRC] => /storage/configuration/wrappers/83/218483/kursolle.se/php.ini
                    [PHP_FCGI_CHILDREN] => 0
                    [PATH] => /sbin:/usr/sbin:/bin:/usr/bin
                    [PWD] => /storage/configuration/wrappers/83/218483/kursolle.se
                    [SHLVL] => 0
                    [PHP_FCGI_MAX_REQUESTS] => 5000
                    [SCRIPT_NAME] => /application/contact03/index.php
                    [REQUEST_URI] => /application/contact03/
                    [QUERY_STRING] => 
                    [REQUEST_METHOD] => GET
                    [SERVER_PROTOCOL] => HTTP/1.1
                    [GATEWAY_INTERFACE] => CGI/1.1
                    [REMOTE_PORT] => 35292
                    [SCRIPT_FILENAME] => /storage/content/83/218483/kursolle.se/public_html/application/contact03/index.php
                    [SERVER_ADMIN] => root@localhost
                    [DOCUMENT_ROOT] => /storage/content/83/218483/kursolle.se/public_html
                    [REMOTE_ADDR] => 54.224.17.157
                    [SERVER_PORT] => 80
                    [SERVER_ADDR] => 10.160.1.19
                    [SERVER_NAME] => kursolle.se
                    [SERVER_SOFTWARE] => Apache
                    [SERVER_SIGNATURE] => 
                    [HTTP_X_FORWARDED_FOR] => 54.224.17.157
                    [HTTP_LOCAL_ADDR] => 195.74.38.121
                    [HTTP_REMOTE_ADDR] => 54.224.17.157
                    [HTTP_CONNECTION] => close
                    [HTTP_IF_MODIFIED_SINCE] => Mon, 21 May 2018 16:43:45 GMT
                    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                    [HTTP_USER_AGENT] => CCBot/2.0 (http://commoncrawl.org/faq/)
                    [HTTP_ACCEPT_ENCODING] => x-gzip, gzip, deflate
                    [HTTP_HOST] => kursolle.se
                    [FCGI_ROLE] => RESPONDER
                    [PHP_SELF] => /application/contact03/index.php
                    [REQUEST_TIME_FLOAT] => 1532345965.173
                    [REQUEST_TIME] => 1532345965
                )

            [_REQUEST] => Array
                (
                )

            [_ENV] => Array
                (
                )

            [GLOBALS] => Array
 *RECURSION*
            [header] => <header>
	<p>En kontaktapplikation</p>
</header>
            [url] => kursolle.se/application/contact03/index.php
            [footer] => <footer>
	<p>&copy; Johan Hällgren</p>
	<p>Validera <a href="http://validator.w3.org/check?uri=kursolle.se/application/contact03/index.php" target="_blank">html</a> <a href="http://jigsaw.w3.org/css-validator/validator?profile=css3&amp;uri=kursolle.se/application/contact03/index.php" target="_blank">css</a></p>
</footer>
            [dbFileName] => contact.sqlite
            [dbFileAdress] => /storage/content/83/218483/kursolle.se/public_html/application/contact03/contact.sqlite
            [downloadJSON] => 
            [developmentMode] => 1
            [mess] => 
            [dbExists] => 1
            [db] => PDO Object
                (
                )

            [action] => 
            [sql] => SELECT * FROM contact ORDER BY contactId ASC;
            [stmt] => PDOStatement Object
                (
                    [queryString] => SELECT * FROM contact ORDER BY contactId ASC;
                )

            [result] => Array
                (
                    [0] => Array
                        (
                            [contactId] => 1
                            [name] => Johan
                            [email] => johan@systemet.se
                        )

                    [1] => Array
                        (
                            [contactId] => 2
                            [name] => Anna
                            [email] => anna@systemet.se
                        )

                    [2] => Array
                        (
                            [contactId] => 3
                            [name] => Bosse
                            [email] => Bosse@systemet.se
                        )

                    [3] => Array
                        (
                            [contactId] => 4
                            [name] => Johan
                            [email] => johan@systemet.se
                        )

                    [4] => Array
                        (
                            [contactId] => 5
                            [name] => Anna
                            [email] => anna@systemet.se
                        )

                    [5] => Array
                        (
                            [contactId] => 6
                            [name] => Bosse
                            [email] => Bosse@systemet.se
                        )

                    [6] => Array
                        (
                            [contactId] => 7
                            [name] => Östen
                            [email] => ö@systemet.se
                        )

                    [7] => Array
                        (
                            [contactId] => 8
                            [name] => Qwerty
                            [email] => q@systemet.se
                        )

                    [8] => Array
                        (
                            [contactId] => 9
                            [name] => Xerxes
                            [email] => x@systemet.se
                        )

                    [9] => Array
                        (
                            [contactId] => 10
                            [name] => 
                            [email] => 
                        )

                )

            [tableContacts] => <table><tr><th>contactId</th><th>name</th><th>email</th></tr>  <tr>
    <td>1</td>
    <td>Johan</td>
    <td>johan@systemet.se</td>
  </tr>  <tr>
    <td>2</td>
    <td>Anna</td>
    <td>anna@systemet.se</td>
  </tr>  <tr>
    <td>3</td>
    <td>Bosse</td>
    <td>Bosse@systemet.se</td>
  </tr>  <tr>
    <td>4</td>
    <td>Johan</td>
    <td>johan@systemet.se</td>
  </tr>  <tr>
    <td>5</td>
    <td>Anna</td>
    <td>anna@systemet.se</td>
  </tr>  <tr>
    <td>6</td>
    <td>Bosse</td>
    <td>Bosse@systemet.se</td>
  </tr>  <tr>
    <td>7</td>
    <td>Östen</td>
    <td>ö@systemet.se</td>
  </tr>  <tr>
    <td>8</td>
    <td>Qwerty</td>
    <td>q@systemet.se</td>
  </tr>  <tr>
    <td>9</td>
    <td>Xerxes</td>
    <td>x@systemet.se</td>
  </tr>  <tr>
    <td>10</td>
    <td></td>
    <td></td>
  </tr></table>
            [row] => Array
                (
                    [contactId] => 10
                    [name] => 
                    [email] => 
                )

            [formContacts] =>   <h2>Lägg till kontakt</h2>
  <form method="POST" action="?action=addContact">
  <fieldset>
    <legend>Lägg till kontakt</legend>
    <p>Namn <input type="text" name="name" required><br>
    Epost <input type="email" name="email" required><br>
    <input type="submit" value="Lägg till"></p>
  </fieldset>
  </form>
            [jsonArray] => Array
                (
                    [contacts] => Array
                        (
                            [0] => Array
                                (
                                    [contactId] => 1
                                    [name] => Johan
                                    [email] => johan@systemet.se
                                )

                            [1] => Array
                                (
                                    [contactId] => 2
                                    [name] => Anna
                                    [email] => anna@systemet.se
                                )

                            [2] => Array
                                (
                                    [contactId] => 3
                                    [name] => Bosse
                                    [email] => Bosse@systemet.se
                                )

                            [3] => Array
                                (
                                    [contactId] => 4
                                    [name] => Johan
                                    [email] => johan@systemet.se
                                )

                            [4] => Array
                                (
                                    [contactId] => 5
                                    [name] => Anna
                                    [email] => anna@systemet.se
                                )

                            [5] => Array
                                (
                                    [contactId] => 6
                                    [name] => Bosse
                                    [email] => Bosse@systemet.se
                                )

                            [6] => Array
                                (
                                    [contactId] => 7
                                    [name] => Östen
                                    [email] => ö@systemet.se
                                )

                            [7] => Array
                                (
                                    [contactId] => 8
                                    [name] => Qwerty
                                    [email] => q@systemet.se
                                )

                            [8] => Array
                                (
                                    [contactId] => 9
                                    [name] => Xerxes
                                    [email] => x@systemet.se
                                )

                            [9] => Array
                                (
                                    [contactId] => 10
                                    [name] => 
                                    [email] => 
                                )

                        )

                )

            [jsonOutput] => <pre>{
    "contacts": [
        {
            "contactId": "1",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "2",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "3",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "4",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "5",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "6",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "7",
            "name": "\u00d6sten",
            "email": "\u00f6@systemet.se"
        },
        {
            "contactId": "8",
            "name": "Qwerty",
            "email": "q@systemet.se"
        },
        {
            "contactId": "9",
            "name": "Xerxes",
            "email": "x@systemet.se"
        },
        {
            "contactId": "10",
            "name": "",
            "email": ""
        }
    ]
}</pre>
            [xml] => DOMDocument Object
                (
                    [doctype] => 
                    [implementation] => (object value omitted)
                    [documentElement] => (object value omitted)
                    [actualEncoding] => UTF-8
                    [encoding] => UTF-8
                    [xmlEncoding] => UTF-8
                    [standalone] => 1
                    [xmlStandalone] => 1
                    [version] => 1.0
                    [xmlVersion] => 1.0
                    [strictErrorChecking] => 1
                    [documentURI] => 
                    [config] => 
                    [formatOutput] => 1
                    [validateOnParse] => 
                    [resolveExternals] => 
                    [preserveWhiteSpace] => 1
                    [recover] => 
                    [substituteEntities] => 
                    [nodeName] => #document
                    [nodeValue] => 
                    [nodeType] => 9
                    [parentNode] => 
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => 
                    [attributes] => 
                    [ownerDocument] => 
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => 
                    [baseURI] => 
                    [textContent] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
                )

            [contactList] => DOMElement Object
                (
                    [tagName] => contactList
                    [schemaTypeInfo] => 
                    [nodeName] => contactList
                    [nodeValue] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
                    [nodeType] => 1
                    [parentNode] => (object value omitted)
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => 
                    [attributes] => (object value omitted)
                    [ownerDocument] => (object value omitted)
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => contactList
                    [baseURI] => 
                    [textContent] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
                )

            [contact] => DOMElement Object
                (
                    [tagName] => contact
                    [schemaTypeInfo] => 
                    [nodeName] => contact
                    [nodeValue] => 
                    [nodeType] => 1
                    [parentNode] => (object value omitted)
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => (object value omitted)
                    [attributes] => (object value omitted)
                    [ownerDocument] => (object value omitted)
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => contact
                    [baseURI] => 
                    [textContent] => 
                )

            [contactId] => DOMAttr Object

Warning: print_r(): Not yet implemented in /storage/content/83/218483/kursolle.se/public_html/application/contact03/index.php on line 301
                (
                    [name] => contactId
                    [specified] => 1
                    [value] => 10
                    [ownerElement] => (object value omitted)
                    [schemaTypeInfo] => 
                    [nodeName] => contactId
                    [nodeValue] => 10
                    [nodeType] => 2
                    [parentNode] => (object value omitted)
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => 
                    [attributes] => 
                    [ownerDocument] => (object value omitted)
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => contactId
                    [baseURI] => 
                    [textContent] => 10
                )

            [name] => DOMElement Object
                (
                    [tagName] => name
                    [schemaTypeInfo] => 
                    [nodeName] => name
                    [nodeValue] => 
                    [nodeType] => 1
                    [parentNode] => (object value omitted)
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => 
                    [nextSibling] => (object value omitted)
                    [attributes] => (object value omitted)
                    [ownerDocument] => (object value omitted)
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => name
                    [baseURI] => 
                    [textContent] => 
                )

            [email] => DOMElement Object
                (
                    [tagName] => email
                    [schemaTypeInfo] => 
                    [nodeName] => email
                    [nodeValue] => 
                    [nodeType] => 1
                    [parentNode] => (object value omitted)
                    [childNodes] => (object value omitted)
                    [firstChild] => (object value omitted)
                    [lastChild] => (object value omitted)
                    [previousSibling] => (object value omitted)
                    [attributes] => (object value omitted)
                    [ownerDocument] => (object value omitted)
                    [namespaceURI] => 
                    [prefix] => 
                    [localName] => email
                    [baseURI] => 
                    [textContent] => 
                )

            [xmlOutput] => <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;contactList&gt;
  &lt;contact contactId=&quot;1&quot;&gt;
    &lt;name&gt;Johan&lt;/name&gt;
    &lt;email&gt;johan@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;2&quot;&gt;
    &lt;name&gt;Anna&lt;/name&gt;
    &lt;email&gt;anna@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;3&quot;&gt;
    &lt;name&gt;Bosse&lt;/name&gt;
    &lt;email&gt;Bosse@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;4&quot;&gt;
    &lt;name&gt;Johan&lt;/name&gt;
    &lt;email&gt;johan@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;5&quot;&gt;
    &lt;name&gt;Anna&lt;/name&gt;
    &lt;email&gt;anna@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;6&quot;&gt;
    &lt;name&gt;Bosse&lt;/name&gt;
    &lt;email&gt;Bosse@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;7&quot;&gt;
    &lt;name&gt;&Ouml;sten&lt;/name&gt;
    &lt;email&gt;&ouml;@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;8&quot;&gt;
    &lt;name&gt;Qwerty&lt;/name&gt;
    &lt;email&gt;q@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;9&quot;&gt;
    &lt;name&gt;Xerxes&lt;/name&gt;
    &lt;email&gt;x@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;10&quot;&gt;
    &lt;name&gt;&lt;/name&gt;
    &lt;email&gt;&lt;/email&gt;
  &lt;/contact&gt;
&lt;/contactList&gt;
</pre>
        )

    [header] => <header>
	<p>En kontaktapplikation</p>
</header>
    [url] => kursolle.se/application/contact03/index.php
    [footer] => <footer>
	<p>&copy; Johan Hällgren</p>
	<p>Validera <a href="http://validator.w3.org/check?uri=kursolle.se/application/contact03/index.php" target="_blank">html</a> <a href="http://jigsaw.w3.org/css-validator/validator?profile=css3&amp;uri=kursolle.se/application/contact03/index.php" target="_blank">css</a></p>
</footer>
    [dbFileName] => contact.sqlite
    [dbFileAdress] => /storage/content/83/218483/kursolle.se/public_html/application/contact03/contact.sqlite
    [downloadJSON] => 
    [developmentMode] => 1
    [mess] => 
    [dbExists] => 1
    [db] => PDO Object
        (
        )

    [action] => 
    [sql] => SELECT * FROM contact ORDER BY contactId ASC;
    [stmt] => PDOStatement Object
        (
            [queryString] => SELECT * FROM contact ORDER BY contactId ASC;
        )

    [result] => Array
        (
            [0] => Array
                (
                    [contactId] => 1
                    [name] => Johan
                    [email] => johan@systemet.se
                )

            [1] => Array
                (
                    [contactId] => 2
                    [name] => Anna
                    [email] => anna@systemet.se
                )

            [2] => Array
                (
                    [contactId] => 3
                    [name] => Bosse
                    [email] => Bosse@systemet.se
                )

            [3] => Array
                (
                    [contactId] => 4
                    [name] => Johan
                    [email] => johan@systemet.se
                )

            [4] => Array
                (
                    [contactId] => 5
                    [name] => Anna
                    [email] => anna@systemet.se
                )

            [5] => Array
                (
                    [contactId] => 6
                    [name] => Bosse
                    [email] => Bosse@systemet.se
                )

            [6] => Array
                (
                    [contactId] => 7
                    [name] => Östen
                    [email] => ö@systemet.se
                )

            [7] => Array
                (
                    [contactId] => 8
                    [name] => Qwerty
                    [email] => q@systemet.se
                )

            [8] => Array
                (
                    [contactId] => 9
                    [name] => Xerxes
                    [email] => x@systemet.se
                )

            [9] => Array
                (
                    [contactId] => 10
                    [name] => 
                    [email] => 
                )

        )

    [tableContacts] => <table><tr><th>contactId</th><th>name</th><th>email</th></tr>  <tr>
    <td>1</td>
    <td>Johan</td>
    <td>johan@systemet.se</td>
  </tr>  <tr>
    <td>2</td>
    <td>Anna</td>
    <td>anna@systemet.se</td>
  </tr>  <tr>
    <td>3</td>
    <td>Bosse</td>
    <td>Bosse@systemet.se</td>
  </tr>  <tr>
    <td>4</td>
    <td>Johan</td>
    <td>johan@systemet.se</td>
  </tr>  <tr>
    <td>5</td>
    <td>Anna</td>
    <td>anna@systemet.se</td>
  </tr>  <tr>
    <td>6</td>
    <td>Bosse</td>
    <td>Bosse@systemet.se</td>
  </tr>  <tr>
    <td>7</td>
    <td>Östen</td>
    <td>ö@systemet.se</td>
  </tr>  <tr>
    <td>8</td>
    <td>Qwerty</td>
    <td>q@systemet.se</td>
  </tr>  <tr>
    <td>9</td>
    <td>Xerxes</td>
    <td>x@systemet.se</td>
  </tr>  <tr>
    <td>10</td>
    <td></td>
    <td></td>
  </tr></table>
    [row] => Array
        (
            [contactId] => 10
            [name] => 
            [email] => 
        )

    [formContacts] =>   <h2>Lägg till kontakt</h2>
  <form method="POST" action="?action=addContact">
  <fieldset>
    <legend>Lägg till kontakt</legend>
    <p>Namn <input type="text" name="name" required><br>
    Epost <input type="email" name="email" required><br>
    <input type="submit" value="Lägg till"></p>
  </fieldset>
  </form>
    [jsonArray] => Array
        (
            [contacts] => Array
                (
                    [0] => Array
                        (
                            [contactId] => 1
                            [name] => Johan
                            [email] => johan@systemet.se
                        )

                    [1] => Array
                        (
                            [contactId] => 2
                            [name] => Anna
                            [email] => anna@systemet.se
                        )

                    [2] => Array
                        (
                            [contactId] => 3
                            [name] => Bosse
                            [email] => Bosse@systemet.se
                        )

                    [3] => Array
                        (
                            [contactId] => 4
                            [name] => Johan
                            [email] => johan@systemet.se
                        )

                    [4] => Array
                        (
                            [contactId] => 5
                            [name] => Anna
                            [email] => anna@systemet.se
                        )

                    [5] => Array
                        (
                            [contactId] => 6
                            [name] => Bosse
                            [email] => Bosse@systemet.se
                        )

                    [6] => Array
                        (
                            [contactId] => 7
                            [name] => Östen
                            [email] => ö@systemet.se
                        )

                    [7] => Array
                        (
                            [contactId] => 8
                            [name] => Qwerty
                            [email] => q@systemet.se
                        )

                    [8] => Array
                        (
                            [contactId] => 9
                            [name] => Xerxes
                            [email] => x@systemet.se
                        )

                    [9] => Array
                        (
                            [contactId] => 10
                            [name] => 
                            [email] => 
                        )

                )

        )

    [jsonOutput] => <pre>{
    "contacts": [
        {
            "contactId": "1",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "2",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "3",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "4",
            "name": "Johan",
            "email": "johan@systemet.se"
        },
        {
            "contactId": "5",
            "name": "Anna",
            "email": "anna@systemet.se"
        },
        {
            "contactId": "6",
            "name": "Bosse",
            "email": "Bosse@systemet.se"
        },
        {
            "contactId": "7",
            "name": "\u00d6sten",
            "email": "\u00f6@systemet.se"
        },
        {
            "contactId": "8",
            "name": "Qwerty",
            "email": "q@systemet.se"
        },
        {
            "contactId": "9",
            "name": "Xerxes",
            "email": "x@systemet.se"
        },
        {
            "contactId": "10",
            "name": "",
            "email": ""
        }
    ]
}</pre>
    [xml] => DOMDocument Object
        (
            [doctype] => 
            [implementation] => (object value omitted)
            [documentElement] => (object value omitted)
            [actualEncoding] => UTF-8
            [encoding] => UTF-8
            [xmlEncoding] => UTF-8
            [standalone] => 1
            [xmlStandalone] => 1
            [version] => 1.0
            [xmlVersion] => 1.0
            [strictErrorChecking] => 1
            [documentURI] => 
            [config] => 
            [formatOutput] => 1
            [validateOnParse] => 
            [resolveExternals] => 
            [preserveWhiteSpace] => 1
            [recover] => 
            [substituteEntities] => 
            [nodeName] => #document
            [nodeValue] => 
            [nodeType] => 9
            [parentNode] => 
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => 
            [attributes] => 
            [ownerDocument] => 
            [namespaceURI] => 
            [prefix] => 
            [localName] => 
            [baseURI] => 
            [textContent] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
        )

    [contactList] => DOMElement Object
        (
            [tagName] => contactList
            [schemaTypeInfo] => 
            [nodeName] => contactList
            [nodeValue] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
            [nodeType] => 1
            [parentNode] => (object value omitted)
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => 
            [attributes] => (object value omitted)
            [ownerDocument] => (object value omitted)
            [namespaceURI] => 
            [prefix] => 
            [localName] => contactList
            [baseURI] => 
            [textContent] => Johanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seJohanjohan@systemet.seAnnaanna@systemet.seBosseBosse@systemet.seÖstenö@systemet.seQwertyq@systemet.seXerxesx@systemet.se
        )

    [contact] => DOMElement Object
        (
            [tagName] => contact
            [schemaTypeInfo] => 
            [nodeName] => contact
            [nodeValue] => 
            [nodeType] => 1
            [parentNode] => (object value omitted)
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => (object value omitted)
            [attributes] => (object value omitted)
            [ownerDocument] => (object value omitted)
            [namespaceURI] => 
            [prefix] => 
            [localName] => contact
            [baseURI] => 
            [textContent] => 
        )

    [contactId] => DOMAttr Object

Warning: print_r(): Not yet implemented in /storage/content/83/218483/kursolle.se/public_html/application/contact03/index.php on line 301
        (
            [name] => contactId
            [specified] => 1
            [value] => 10
            [ownerElement] => (object value omitted)
            [schemaTypeInfo] => 
            [nodeName] => contactId
            [nodeValue] => 10
            [nodeType] => 2
            [parentNode] => (object value omitted)
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => 
            [attributes] => 
            [ownerDocument] => (object value omitted)
            [namespaceURI] => 
            [prefix] => 
            [localName] => contactId
            [baseURI] => 
            [textContent] => 10
        )

    [name] => DOMElement Object
        (
            [tagName] => name
            [schemaTypeInfo] => 
            [nodeName] => name
            [nodeValue] => 
            [nodeType] => 1
            [parentNode] => (object value omitted)
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => 
            [nextSibling] => (object value omitted)
            [attributes] => (object value omitted)
            [ownerDocument] => (object value omitted)
            [namespaceURI] => 
            [prefix] => 
            [localName] => name
            [baseURI] => 
            [textContent] => 
        )

    [email] => DOMElement Object
        (
            [tagName] => email
            [schemaTypeInfo] => 
            [nodeName] => email
            [nodeValue] => 
            [nodeType] => 1
            [parentNode] => (object value omitted)
            [childNodes] => (object value omitted)
            [firstChild] => (object value omitted)
            [lastChild] => (object value omitted)
            [previousSibling] => (object value omitted)
            [attributes] => (object value omitted)
            [ownerDocument] => (object value omitted)
            [namespaceURI] => 
            [prefix] => 
            [localName] => email
            [baseURI] => 
            [textContent] => 
        )

    [xmlOutput] => <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;contactList&gt;
  &lt;contact contactId=&quot;1&quot;&gt;
    &lt;name&gt;Johan&lt;/name&gt;
    &lt;email&gt;johan@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;2&quot;&gt;
    &lt;name&gt;Anna&lt;/name&gt;
    &lt;email&gt;anna@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;3&quot;&gt;
    &lt;name&gt;Bosse&lt;/name&gt;
    &lt;email&gt;Bosse@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;4&quot;&gt;
    &lt;name&gt;Johan&lt;/name&gt;
    &lt;email&gt;johan@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;5&quot;&gt;
    &lt;name&gt;Anna&lt;/name&gt;
    &lt;email&gt;anna@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;6&quot;&gt;
    &lt;name&gt;Bosse&lt;/name&gt;
    &lt;email&gt;Bosse@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;7&quot;&gt;
    &lt;name&gt;&Ouml;sten&lt;/name&gt;
    &lt;email&gt;&ouml;@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;8&quot;&gt;
    &lt;name&gt;Qwerty&lt;/name&gt;
    &lt;email&gt;q@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;9&quot;&gt;
    &lt;name&gt;Xerxes&lt;/name&gt;
    &lt;email&gt;x@systemet.se&lt;/email&gt;
  &lt;/contact&gt;
  &lt;contact contactId=&quot;10&quot;&gt;
    &lt;name&gt;&lt;/name&gt;
    &lt;email&gt;&lt;/email&gt;
  &lt;/contact&gt;
&lt;/contactList&gt;
</pre>
)