Skip to main content

PHP XML

PHP XML Parsers What is XML? The XML language is a way to structure data for sharing across websites. Several web technologies like RSS Feeds and Podcasts are written in XML. XML is easy to create. It looks a lot like HTML, except that you make up your own tags. If you want to learn more about XML, please visit our XML tutorial. What is an XML Parser? To read and update, create and manipulate an XML document, you will need an XML parser. In PHP there are two major types of XML parsers: Tree-Based Parsers Event-Based Parsers Tree-Based Parsers Tree-based parsers holds the entire document in Memory and transforms the XML document into a Tree structure. It analyzes the whole document, and provides access to the Tree elements (DOM). This type of parser is a better option for smaller XML documents, but not for large XML document as it causes major performance issues. Example of tree-based parsers: SimpleXML DOM Event-Based Parsers Event-based parsers do not hold the entire document in Memory, instead, they read in one node at a time and allow you to interact with in real time. Once you move onto the next node, the old one is thrown away. This type of parser is well suited for large XML documents. It parses faster and consumes less memory. Example of event-based parsers: XMLReader XML Expat Parser PHP SimpleXML Parser SimpleXML is a PHP extension that allows us to easily manipulate and get XML data. The SimpleXML Parser SimpleXML is a tree-based parser. SimpleXML provides an easy way of getting an element's name, attributes and textual content if you know the XML document's structure or layout. SimpleXML turns an XML document into a data structure you can iterate through like a collection of arrays and objects. Compared to DOM or the Expat parser, SimpleXML takes a fewer lines of code to read text data from an element. Installation From PHP 5, the SimpleXML functions are part of the PHP core. No installation is required to use these functions. PHP SimpleXML - Read From String The PHP simplexml_load_string() function is used to read XML data from a string. Assume we have a variable that contains XML data, like this: $myXMLData = " Tove Jani Reminder Don't forget me this weekend! "; The example below shows how to use the simplexml_load_string() function to read XML data from a string: Example Tove Jani Reminder Don't forget me this weekend! "; $xml=simplexml_load_string($myXMLData) or die("Error: Cannot create object"); print_r($xml); ?> The output of the code above will be: SimpleXMLElement Object ( [to] => Tove [from] => Jani [heading] => Reminder [body] => Don't forget me this weekend! ) Error Handling Tip: Use the libxml functionality to retrieve all XML errors when loading the document and then iterate over the errors. The following example tries to load a broken XML string: Example John Doe john@example.com "; $xml = simplexml_load_string($myXMLData); if ($xml === false) { echo "Failed loading XML: "; foreach(libxml_get_errors() as $error) { echo "
", $error->message; } } else { print_r($xml); } ?> The output of the code above will be: Failed loading XML: Opening and ending tag mismatch: user line 3 and wronguser Opening and ending tag mismatch: email line 4 and wrongemail PHP SimpleXML - Read From File The PHP simplexml_load_file() function is used to read XML data from a file. Assume we have an XML file called "note.xml", that looks like this: Tove Jani Reminder Don't forget me this weekend! The example below shows how to use the simplexml_load_file() function to read XML data from a file: Example The output of the code above will be: SimpleXMLElement Object ( [to] => Tove [from] => Jani [heading] => Reminder [body] => Don't forget me this weekend! ) Tip: The next chapter shows how to get/retrieve node values from an XML file with SimpleXML! PHP SimpleXML - Get Node/Attribute Values SimpleXML is a PHP extension that allows us to easily manipulate and get XML data. PHP SimpleXML - Get Node Values Get the node values from the "note.xml" file: Example to . "
"; echo $xml->from . "
"; echo $xml->heading . "
"; echo $xml->body; ?> The output of the code above will be: Tove Jani Reminder Don't forget me this weekend! Another XML File Assume we have an XML file called "books.xml", that looks like this: Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 XQuery Kick Start James McGovern 2003 49.99 Learning XML Erik T. Ray 2003 39.95 PHP SimpleXML - Get Node Values of Specific Elements The following example gets the node value of the element in the first and second <book> elements in the "books.xml" file: Example <?php $xml=simplexml_load_file("books.xml") or die("Error: Cannot create object"); echo $xml->book[0]->title . "<br>"; echo $xml->book[1]->title; ?> The output of the code above will be: Everyday Italian Harry Potter PHP SimpleXML - Get Node Values - Loop The following example loops through all the <book> elements in the "books.xml" file, and gets the node values of the <title>, <author>, <year>, and <price> elements: Example <?php $xml=simplexml_load_file("books.xml") or die("Error: Cannot create object"); foreach($xml->children() as $books) { echo $books->title . ", "; echo $books->author . ", "; echo $books->year . ", "; echo $books->price . "<br>"; } ?> The output of the code above will be: Everyday Italian, Giada De Laurentiis, 2005, 30.00 Harry Potter, J K. Rowling, 2005, 29.99 XQuery Kick Start, James McGovern, 2003, 49.99 Learning XML, Erik T. Ray, 2003, 39.95 PHP SimpleXML - Get Attribute Values The following example gets the attribute value of the "category" attribute of the first <book> element and the attribute value of the "lang" attribute of the <title> element in the second <book> element: Example <?php $xml=simplexml_load_file("books.xml") or die("Error: Cannot create object"); echo $xml->book[0]['category'] . "<br>"; echo $xml->book[1]->title['lang']; ?> The output of the code above will be: COOKING en PHP SimpleXML - Get Attribute Values - Loop The following example gets the attribute values of the <title> elements in the "books.xml" file: Example <?php $xml=simplexml_load_file("books.xml") or die("Error: Cannot create object"); foreach($xml->children() as $books) { echo $books->title['lang']; echo "<br>"; } ?> The output of the code above will be: en en en-us en-us PHP XML Expat Parser The built-in XML Expat Parser makes it possible to process XML documents in PHP. The XML Expat Parser The Expat parser is an event-based parser. Look at the following XML fraction: <from>Jani</from> An event-based parser reports the XML above as a series of three events: Start element: from Start CDATA section, value: Jani Close element: from The XML Expat Parser functions are part of the PHP core. There is no installation needed to use these functions. The XML File The XML file "note.xml" will be used in the example below: <?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> Initializing the XML Expat Parser We want to initialize the XML Expat Parser in PHP, define some handlers for different XML events, and then parse the XML file. Example <?php // Initialize the XML parser $parser=xml_parser_create(); // Function to use at the start of an element function start($parser,$element_name,$element_attrs) { switch($element_name) { case "NOTE": echo "-- Note --<br>"; break; case "TO": echo "To: "; break; case "FROM": echo "From: "; break; case "HEADING": echo "Heading: "; break; case "BODY": echo "Message: "; } } // Function to use at the end of an element function stop($parser,$element_name) { echo "<br>"; } // Function to use when finding character data function char($parser,$data) { echo $data; } // Specify element handler xml_set_element_handler($parser,"start","stop"); // Specify data handler xml_set_character_data_handler($parser,"char"); // Open XML file $fp=fopen("note.xml","r"); // Read data while ($data=fread($fp,4096)) { xml_parse($parser,$data,feof($fp)) or die (sprintf("XML Error: %s at line %d", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); } // Free the XML parser xml_parser_free($parser); ?> Example explained: Initialize the XML parser with the xml_parser_create() function Create functions to use with the different event handlers Add the xml_set_element_handler() function to specify which function will be executed when the parser encounters the opening and closing tags Add the xml_set_character_data_handler() function to specify which function will execute when the parser encounters character data Parse the file "note.xml" with the xml_parse() function In case of an error, add xml_error_string() function to convert an XML error to a textual description Call the xml_parser_free() function to release the memory allocated with the xml_parser_create() function PHP XML DOM Parser The built-in DOM parser makes it possible to process XML documents in PHP. The XML DOM Parser The DOM parser is a tree-based parser. Look at the following XML document fraction: <?xml version="1.0" encoding="UTF-8"?> <from>Jani</from> The DOM sees the XML above as a tree structure: Level 1: XML Document Level 2: Root element: <from> Level 3: Text element: "Jani" Installation The DOM parser functions are part of the PHP core. There is no installation needed to use these functions. The XML File The XML file below ("note.xml") will be used in our example: <?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> Load and Output XML We want to initialize the XML parser, load the xml, and output it: <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("note.xml"); print $xmlDoc->saveXML(); ?> The output of the code above will be: Tove Jani Reminder Don't forget me this weekend! If you select "View source" in the browser window, you will see the following HTML: <?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note> The example above creates a DOMDocument-Object and loads the XML from "note.xml" into it. Then the saveXML() function puts the internal XML document into a string, so we can output it. Looping through XML We want to initialize the XML parser, load the XML, and loop through all elements of the <note> element: <?php $xmlDoc = new DOMDocument(); $xmlDoc->load("note.xml"); $x = $xmlDoc->documentElement; foreach ($x->childNodes AS $item) { print $item->nodeName . " = " . $item->nodeValue . "<br>"; } ?> The output of the code above will be: #text = to = Tove #text = from = Jani #text = heading = Reminder #text = body = Don't forget me this weekend! #text = In the example above you see that there are empty text nodes between each element. When XML generates, it often contains white-spaces between the nodes. The XML DOM parser treats these as ordinary elements, and if you are not aware of them, they sometimes cause problems. </div> <div class='post-sidebar invisible'> <div class='post-share-buttons post-share-buttons-top'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-Blog1-normalpostsidebar-7387955434870009482' class='sharing' data-title='PHP XML'> <button aria-controls='sharing-popup-Blog1-normalpostsidebar-7387955434870009482' aria-label='Share' class='sharing-button touch-icon-button flat-button ripple' id='sharing-button-Blog1-normalpostsidebar-7387955434870009482' role='button'> Share </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-Blog1-normalpostsidebar-7387955434870009482' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=facebook' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=twitter' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Twitter'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Twitter</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=pinterest' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=email' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> </div> </div> </div> <div class='post-bottom'> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='byline post-icons'> <span class='item-action'> <a href='https://www.blogger.com/email-post.g?blogID=6006907896978318308&postID=7387955434870009482' title='Email Post'> <svg class='svg-icon-24 touch-icon sharing-icon'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </a> </span> </span> </div> <div class='post-footer-line post-footer-line-2'> </div> </div> <div class='post-share-buttons post-share-buttons-bottom'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-Blog1-byline-7387955434870009482' class='sharing' data-title='PHP XML'> <button aria-controls='sharing-popup-Blog1-byline-7387955434870009482' aria-label='Share' class='sharing-button touch-icon-button flat-button ripple' id='sharing-button-Blog1-byline-7387955434870009482' role='button'> Share </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-Blog1-byline-7387955434870009482' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=facebook' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=twitter' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Twitter'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Twitter</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=pinterest' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=7387955434870009482&target=email' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://myteknohood.blogspot.com/2020/12/php-xml.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> </div> </div> </div> </div> <section class='comments' data-num-comments='0' id='comments'> <a name='comments'></a> <h3 class='title'>Comments</h3> <div id='Blog1_comments-block-wrapper'> </div> <div class='footer'> <a href='https://www.blogger.com/comment/fullpage/post/6006907896978318308/7387955434870009482' onclick='javascript:window.open(this.href, "bloggerPopup", "toolbar=0,location=0,statusbar=1,menubar=0,scrollbars=yes,width=640,height=500"); return false;'> Post a Comment </a> </div> </section> </article> </div> </div><div class='widget PopularPosts' data-version='2' id='PopularPosts1'> <h3 class='title'> Popular posts from this blog </h3> <div role='feed'> <article class='post' role='article'> <div class='post-outer-container'> <div class='post-outer'> <div class='snippet-thumbnail thumbnail-empty'></div> <div class='post-content container'> <div class='post-title-container'> <a name='1308730884471459098'></a> <h3 class='post-title entry-title'> <a href='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html'>MySQL Databases PDO</a> </h3> </div> <div class='post-header-container container'> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> <meta content='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html'/> <a class='timestamp-link' href='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2020-12-28T07:59:00-08:00' title='2020-12-28T07:59:00-08:00'> December 28, 2020 </time> </a> </span> </div> </div> </div> <div class='container post-body entry-content' id='post-snippet-1308730884471459098'> <div class='post-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> PHP MySQL Use The ORDER BY Clause Select and Order Data From a MySQL Database The ORDER BY clause is used to sort the result-set in ascending or descending order. The ORDER BY clause sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword. SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC To learn more about SQL, please visit our SQL tutorial. Select and Order Data With MySQLi The following example selects the id, firstname and lastname columns from the MyGuests table. The records will be ordered by the lastname column: Example (MySQLi Object-oriented) connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT id, firstname, lastname FROM MyGuests ORDER BY lastname"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. </div> <a class='snippet-fade r-snippet-fade hidden' href='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html'></a> </div> </div> <div class='post-bottom'> <div class='post-footer'> <div class='post-footer-line post-footer-line-0'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-PopularPosts1-footer-0-1308730884471459098' class='sharing' data-title='MySQL Databases PDO'> <button aria-controls='sharing-popup-PopularPosts1-footer-0-1308730884471459098' aria-label='Share' class='sharing-button touch-icon-button flat-button ripple' id='sharing-button-PopularPosts1-footer-0-1308730884471459098' role='button'> Share </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-PopularPosts1-footer-0-1308730884471459098' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=1308730884471459098&target=' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=1308730884471459098&target=facebook' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=1308730884471459098&target=twitter' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Share to Twitter'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Twitter</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=1308730884471459098&target=pinterest' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=1308730884471459098&target=email' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> <span class='byline post-comment-link container'> <a class='comment-link flat-button ripple' href='https://www.blogger.com/comment/fullpage/post/6006907896978318308/1308730884471459098' onclick='javascript:window.open(this.href, "bloggerPopup", "toolbar=0,location=0,statusbar=1,menubar=0,scrollbars=yes,width=640,height=500"); return false;'> Post a Comment </a> </span> </div> </div> <div class='byline jump-link'> <a class='flat-button ripple' href='https://myteknohood.blogspot.com/2020/12/mysql-databases-pdo.html' title='MySQL Databases PDO'> Read more </a> </div> </div> </div> </div> </div> </article> <article class='post' role='article'> <div class='post-outer-container'> <div class='post-outer'> <div class='snippet-thumbnail thumbnail-empty'></div> <div class='post-content container'> <div class='post-title-container'> <a name='2737039758067227443'></a> <h3 class='post-title entry-title'> <a href='https://myteknohood.blogspot.com/2020/12/php-oop.html'>PHP OOP</a> </h3> </div> <div class='post-header-container container'> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> <meta content='https://myteknohood.blogspot.com/2020/12/php-oop.html'/> <a class='timestamp-link' href='https://myteknohood.blogspot.com/2020/12/php-oop.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2020-12-28T07:47:00-08:00' title='2020-12-28T07:47:00-08:00'> December 28, 2020 </time> </a> </span> </div> </div> </div> <div class='container post-body entry-content' id='post-snippet-2737039758067227443'> <div class='post-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> PHP - What is OOP? From PHP5, you can also write PHP code in an object-oriented style. Object-Oriented programming is faster and easier to execute. PHP What is OOP? OOP stands for Object-Oriented Programming. Procedural programming is about writing procedures or functions that perform operations on the data, while object-oriented programming is about creating objects that contain both data and functions. Object-oriented programming has several advantages over procedural programming: OOP is faster and easier to execute OOP provides a clear structure for the programs OOP helps to keep the PHP code DRY "Don't Repeat Yourself", and makes the code easier to maintain, modify and debug OOP makes it possible to create full reusable applications with less code and shorter development time Tip: The "Don't Repeat Yourself" (DRY) principle is about reducing the repetition of code. You should extract out the codes that are common for the applicatio </div> <a class='snippet-fade r-snippet-fade hidden' href='https://myteknohood.blogspot.com/2020/12/php-oop.html'></a> </div> </div> <div class='post-bottom'> <div class='post-footer'> <div class='post-footer-line post-footer-line-0'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-PopularPosts1-footer-0-2737039758067227443' class='sharing' data-title='PHP OOP'> <button aria-controls='sharing-popup-PopularPosts1-footer-0-2737039758067227443' aria-label='Share' class='sharing-button touch-icon-button flat-button ripple' id='sharing-button-PopularPosts1-footer-0-2737039758067227443' role='button'> Share </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-PopularPosts1-footer-0-2737039758067227443' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=2737039758067227443&target=' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=2737039758067227443&target=facebook' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=2737039758067227443&target=twitter' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Share to Twitter'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Twitter</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=2737039758067227443&target=pinterest' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=2737039758067227443&target=email' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://myteknohood.blogspot.com/2020/12/php-oop.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> <span class='byline post-comment-link container'> <a class='comment-link flat-button ripple' href='https://www.blogger.com/comment/fullpage/post/6006907896978318308/2737039758067227443' onclick='javascript:window.open(this.href, "bloggerPopup", "toolbar=0,location=0,statusbar=1,menubar=0,scrollbars=yes,width=640,height=500"); return false;'> Post a Comment </a> </span> </div> </div> <div class='byline jump-link'> <a class='flat-button ripple' href='https://myteknohood.blogspot.com/2020/12/php-oop.html' title='PHP OOP'> Read more </a> </div> </div> </div> </div> </div> </article> <article class='post' role='article'> <div class='post-outer-container'> <div class='post-outer'> <a class='snippet-thumbnail' href='https://myteknohood.blogspot.com/2020/12/php-ajax.html'> <span class='snippet-thumbnail-img' id='snippet_thumbnail_id_5576479800649526524'></span> <style> @media (min-width: 1168px) { #snippet_thumbnail_id_5576479800649526524 { background-image: url(https\:\/\/lh3.googleusercontent.com\/blogger_img_proxy\/AEn0k_suNi501Qk5B8zCNlKWdjRdK7DjflWC5lKap4G-LufEubiQyVP1JyLOhmHDtdhopD8=w256-h256-p-k-no-nu); } } @media (min-width: 969px) and (max-width: 1167px) { #snippet_thumbnail_id_5576479800649526524 { background-image: url(https\:\/\/lh3.googleusercontent.com\/blogger_img_proxy\/AEn0k_suNi501Qk5B8zCNlKWdjRdK7DjflWC5lKap4G-LufEubiQyVP1JyLOhmHDtdhopD8=w1167-h778-p-k-no-nu); } } @media (min-width: 601px) and (max-width: 968px) { #snippet_thumbnail_id_5576479800649526524 { background-image: url(https\:\/\/lh3.googleusercontent.com\/blogger_img_proxy\/AEn0k_suNi501Qk5B8zCNlKWdjRdK7DjflWC5lKap4G-LufEubiQyVP1JyLOhmHDtdhopD8=w968-h645-p-k-no-nu); } } @media (max-width: 600px) { #snippet_thumbnail_id_5576479800649526524 { background-image: url(https\:\/\/lh3.googleusercontent.com\/blogger_img_proxy\/AEn0k_suNi501Qk5B8zCNlKWdjRdK7DjflWC5lKap4G-LufEubiQyVP1JyLOhmHDtdhopD8=w600-h400-p-k-no-nu); } } </style> </a> <div class='post-content container'> <div class='post-title-container'> <a name='5576479800649526524'></a> <h3 class='post-title entry-title'> <a href='https://myteknohood.blogspot.com/2020/12/php-ajax.html'>PHP - AJAX</a> </h3> </div> <div class='post-header-container container'> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> <meta content='https://myteknohood.blogspot.com/2020/12/php-ajax.html'/> <a class='timestamp-link' href='https://myteknohood.blogspot.com/2020/12/php-ajax.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2020-12-28T08:07:00-08:00' title='2020-12-28T08:07:00-08:00'> December 28, 2020 </time> </a> </span> </div> </div> </div> <div class='container post-body entry-content' id='post-snippet-5576479800649526524'> <div class='post-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> PHP - AJAX Introduction AJAX is about updating parts of a web page, without reloading the whole page. What is AJAX? AJAX = Asynchronous JavaScript and XML. AJAX is a technique for creating fast and dynamic web pages. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. Classic web pages, (which do not use AJAX) must reload the entire page if the content should change. Examples of applications using AJAX: Google Maps, Gmail, Youtube, and Facebook tabs. How AJAX Works AJAX AJAX is Based on Internet Standards AJAX is based on internet standards, and uses a combination of: XMLHttpRequest object (to exchange data asynchronously with a server) JavaScript/DOM (to display/interact with the information) CSS (to style the data) XML (often used as the format for transferring data) AJAX applications are browse </div> <a class='snippet-fade r-snippet-fade hidden' href='https://myteknohood.blogspot.com/2020/12/php-ajax.html'></a> </div> </div> <div class='post-bottom'> <div class='post-footer'> <div class='post-footer-line post-footer-line-0'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-PopularPosts1-footer-0-5576479800649526524' class='sharing' data-title='PHP - AJAX'> <button aria-controls='sharing-popup-PopularPosts1-footer-0-5576479800649526524' aria-label='Share' class='sharing-button touch-icon-button flat-button ripple' id='sharing-button-PopularPosts1-footer-0-5576479800649526524' role='button'> Share </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-PopularPosts1-footer-0-5576479800649526524' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=5576479800649526524&target=' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=5576479800649526524&target=facebook' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to Twitter' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=5576479800649526524&target=twitter' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Share to Twitter'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Twitter</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=5576479800649526524&target=pinterest' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=6006907896978318308&postID=5576479800649526524&target=email' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://myteknohood.blogspot.com/2020/12/php-ajax.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> <span class='byline post-comment-link container'> <a class='comment-link flat-button ripple' href='https://www.blogger.com/comment/fullpage/post/6006907896978318308/5576479800649526524' onclick='javascript:window.open(this.href, "bloggerPopup", "toolbar=0,location=0,statusbar=1,menubar=0,scrollbars=yes,width=640,height=500"); return false;'> Post a Comment </a> </span> </div> </div> <div class='byline jump-link'> <a class='flat-button ripple' href='https://myteknohood.blogspot.com/2020/12/php-ajax.html' title='PHP - AJAX'> Read more </a> </div> </div> </div> </div> </div> </article> </div> </div></div> </main> </div> </div> </div> <aside class='sidebar-container sidebar-invisible' role='complementary'> <div class='navigation container'> <button class='svg-icon-24-button sidebar-back flat-icon-button ripple'> <svg class='svg-icon-24'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_arrow_forward_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </button> </div> <div class='sidebar section' id='sidebar' name='Sidebar'> <div class='widget BlogArchive' data-version='2' id='BlogArchive1'> <details class='collapsible extendable'> <summary> <div class='collapsible-title'> <h3 class='title'> Archive </h3> <svg class='svg-icon-24 chevron-down'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_more_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <svg class='svg-icon-24 chevron-up'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_less_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </div> </summary> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <div class='first-items'> <ul class='flat'> <li class='archivedate'> <a href='https://myteknohood.blogspot.com/2020/12/'>December 2020<span class='post-count'>12</span></a> </li> </ul> </div> </div> </div> </div> </details> </div> <div class='widget ReportAbuse' data-version='2' id='ReportAbuse1'> <h3 class='title'> <a class='report_abuse' href='https://www.blogger.com/go/report-abuse' rel='noopener nofollow' target='_blank'> Report Abuse </a> </h3> </div> </div> </aside> </div> <footer class='footer section' id='footer' name='Footer'><div class='widget Attribution' data-version='2' id='Attribution1'> <div class='widget-content'> <div class='blogger'> <a href='https://www.blogger.com' rel='nofollow'> <svg class='svg-icon-24'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_post_blogger_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> Powered by Blogger </a> </div> </div> </div></footer> </div> <script type="text/javascript" src="https://resources.blogblog.com/blogblog/data/res/3756689357-rockpool_compiled.js" async="true"></script> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/3576124627-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY4nLciL1RSqrdxMgtYZFtErG39_JQ:1726787582699';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d6006907896978318308','//myteknohood.blogspot.com/2020/12/php-xml.html','6006907896978318308'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '6006907896978318308', 'title': 'myteknohood', 'url': 'https://myteknohood.blogspot.com/2020/12/php-xml.html', 'canonicalUrl': 'https://myteknohood.blogspot.com/2020/12/php-xml.html', 'homepageUrl': 'https://myteknohood.blogspot.com/', 'searchUrl': 'https://myteknohood.blogspot.com/search', 'canonicalHomepageUrl': 'https://myteknohood.blogspot.com/', 'blogspotFaviconUrl': 'https://myteknohood.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': true, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en-GB', 'localeUnderscoreDelimited': 'en_gb', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22myteknohood - Atom\x22 href\x3d\x22https://myteknohood.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22myteknohood - RSS\x22 href\x3d\x22https://myteknohood.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22myteknohood - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/6006907896978318308/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22myteknohood - Atom\x22 href\x3d\x22https://myteknohood.blogspot.com/feeds/7387955434870009482/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/bea942728df245a5', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': 'Share to Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en_GB\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'item', 'postId': '7387955434870009482', 'pageName': 'PHP XML', 'pageTitle': 'myteknohood: PHP XML', 'metaDescription': ''}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard', 'ok': 'Ok', 'postLink': 'Post link'}}, {'name': 'template', 'data': {'name': 'Notable', 'localizedName': 'Notable', 'isResponsive': true, 'isAlternateRendering': false, 'isCustom': false, 'variant': 'rockpool_deep_warm_grey', 'variantId': 'rockpool_deep_warm_grey'}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'PHP XML', 'description': '', 'url': 'https://myteknohood.blogspot.com/2020/12/php-xml.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 7387955434870009482}}, {'name': 'widgets', 'data': [{'title': 'myteknohood (Header)', 'type': 'Header', 'sectionId': 'header', 'id': 'Header1'}, {'type': 'BlogArchive', 'sectionId': 'sidebar', 'id': 'BlogArchive1'}, {'title': '', 'type': 'ReportAbuse', 'sectionId': 'sidebar', 'id': 'ReportAbuse1'}, {'title': 'Search This Blog', 'type': 'BlogSearch', 'sectionId': 'search_top', 'id': 'BlogSearch1'}, {'title': '', 'type': 'FeaturedPost', 'sectionId': 'page_body', 'id': 'FeaturedPost1', 'postId': '5576479800649526524'}, {'title': 'Blog Posts', 'type': 'Blog', 'sectionId': 'page_body', 'id': 'Blog1', 'posts': [{'id': '7387955434870009482', 'title': 'PHP XML', 'showInlineAds': true}], 'headerByline': {'regionName': 'header1', 'items': [{'name': 'timestamp', 'label': ''}]}, 'footerBylines': [{'regionName': 'footer1', 'items': [{'name': 'share', 'label': ''}, {'name': 'comments', 'label': 'comments'}, {'name': 'labels', 'label': 'Labels:'}, {'name': 'icons', 'label': ''}]}, {'regionName': 'footer3', 'items': [{'name': 'location', 'label': 'Location:'}]}], 'allBylineItems': [{'name': 'timestamp', 'label': ''}, {'name': 'share', 'label': ''}, {'name': 'comments', 'label': 'comments'}, {'name': 'labels', 'label': 'Labels:'}, {'name': 'icons', 'label': ''}, {'name': 'location', 'label': 'Location:'}]}, {'title': '', 'type': 'PopularPosts', 'sectionId': 'page_body', 'id': 'PopularPosts1', 'posts': [{'title': 'MySQL Databases PDO', 'id': 1308730884471459098}, {'title': 'PHP OOP', 'id': 2737039758067227443}, {'title': 'PHP - AJAX', 'id': 5576479800649526524}]}, {'type': 'Attribution', 'sectionId': 'footer', 'id': 'Attribution1'}]}]); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ReportAbuseView', new _WidgetInfo('ReportAbuse1', 'sidebar', document.getElementById('ReportAbuse1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogSearchView', new _WidgetInfo('BlogSearch1', 'search_top', document.getElementById('BlogSearch1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FeaturedPostView', new _WidgetInfo('FeaturedPost1', 'page_body', document.getElementById('FeaturedPost1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'page_body', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/2439022129-lbx__en_gb.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/13464135-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'page_body', document.getElementById('PopularPosts1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'footer', document.getElementById('Attribution1'), {}, 'displayModeFull')); </script> </body> </html>