{"id":11037,"date":"2014-12-13T05:07:19","date_gmt":"2014-12-12T18:07:19","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=11037"},"modified":"2014-12-13T05:07:19","modified_gmt":"2014-12-12T18:07:19","slug":"phpjavascript-dynamic-gallery-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascript-dynamic-gallery-primer-tutorial\/","title":{"rendered":"PHP\/Javascript Dynamic Gallery Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/gallery_creator.php\"><img decoding=\"async\" id='wkkjfsqxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP\/Javascript Dynamic Gallery Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/gallery_creator-3.jpg\" title=\"PHP\/Javascript Dynamic Gallery Primer Tutorial\" id=\"qsqqqwpnerpt\"  \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Dynamic Gallery Primer Tutorial<\/p><\/div>\n<p>The design of today&#8217;s PHP Dynamic Gallery <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/gallery_creator.php\" title=\"Click picture\">tutorial<\/a> has so much in common, as far as inputs and process go, with <a target=_blank href='#pjdspt' title='PHP\/Javascript Dynamic Slideshow Primer Tutorial'>PHP\/Javascript Dynamic Slideshow Primer Tutorial<\/a> as shown below, that we base the software coding on it, happily building on it as a firm basis.  We add to that firm basis the functionality to cater for <a target=_blank title='Data URI information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data URL<\/a>s.<\/p>\n<p>So with today&#8217;s web application you browse for image files via a Browse button (for local client image files) or URLs, which become slides that get presented in a Gallery presentation.<\/p>\n<p>The download PHP Dynamic gallery creation code is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/gallery_creator.php-GETME\" title='gallery_creator.php'>gallery_creator.php<\/a> &#8230; which uses the local gallery presenter ideas at this blog.  It would be fairly simple to take the concepts and work the CSS to change things about what it looks like or to change the Javascript to change its functionality &#8230; and how we progressed is shown by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/gallery_creator.php-GETME\" title='gallery_creator.php'>gallery_creator.php<\/a><\/p>\n<p>You can download supervisory PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php---------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> here or use a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title='fileinfotable.php'>supervisory live run<\/a> link and the changes made can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php---------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> link.<\/p>\n<p>Hope you get some ideas from today&#8217;s posting walking through the gallery.<\/p>\n<hr \/>\n<p id='pjdspt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=11018' title='PHP\/Javascript Dynamic Slideshow Primer Tutorial'>PHP\/Javascript Dynamic Slideshow Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/slideshow_creator.php\"><img decoding=\"async\" id='kkjfsqxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP\/Javascript Dynamic Slideshow Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/slideshow_creator-2.jpg\" title=\"PHP\/Javascript Dynamic Slideshow Primer Tutorial\" id=\"qqqwpnerpt\"  \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript Dynamic Slideshow Primer Tutorial<\/p><\/div>\n<p>The design of today&#8217;s PHP Dynamic Slideshow <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/slideshow_creator.php\" title=\"Click picture\">tutorial<\/a> has so much in common, as far as inputs and process go, with <a target=_blank href='#phttct' title='PHP HTML\/XML to Text Conversion Tutorial'>PHP HTML\/XML to Text Conversion Tutorial<\/a> as shown below, that we base the software coding on it, happily building on it as a firm basis.  We add to that firm basis the functionality to cater for <a target=_blank title='Data URI information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Data_URI_scheme'>data URL<\/a>s.<\/p>\n<p>So with today&#8217;s web application you browse for image files via a Browse button (for local client image files) or URLs, which become slides that get presented in a Slideshow presentation.<\/p>\n<p>The download PHP Dynamic slideshow creation code is <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/slideshow_creator.php-GETME\" title='slideshow_creator.php'>slideshow_creator.php<\/a> &#8230; which uses the local slideshow presenter ideas at this blog.  It would be fairly simple to take the concepts and work the CSS to change things about what it looks like or to change the Javascript to change its functionality &#8230; and how we progressed is shown by <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/slideshow_creator.php-GETME\" title='slideshow_creator.php'>slideshow_creator.php<\/a><\/p>\n<p>You can download supervisory PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> here or use a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title='fileinfotable.php'>supervisory live run<\/a> link and the changes made can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php--------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> link.<\/p>\n<p>Hope you get some ideas from today&#8217;s posting.   See you on the flip side.<\/p>\n<hr \/>\n<p id='pnercft'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10759' title='PHP Nested Elements Report Client Files Tutorial'>PHP Nested Elements Report Client Files Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\"><img decoding=\"async\" id='fsqxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP Nested Elements Report Client Files Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tag_within_local.jpg\" title=\"PHP Nested Elements Report Client Files Tutorial\" id=\"qwpnerpt\"  \/><\/a><p class=\"wp-caption-text\">PHP Nested Elements Report Client Files Tutorial<\/p><\/div>\n<p><i>&#8220;Tomorrow&#8221;<\/i> is now <i>&#8220;today&#8221;<\/i>, and the Earth has had another roll &#8230; just like my dog in the park when there is <i>&#8220;good stuff&#8221;<\/i> present &#8230; please don&#8217;t ask?!<\/p>\n<p>Maybe yesterday&#8217;s blurb got you looking at <a target=_blank title='PHP\/Javascript Replace String File Browsing Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10545'>PHP\/Javascript Replace String File Browsing Tutorial<\/a> and its use of the wonderful HTML5 File API functionality.   This is what gets used here today, to be able to report <i>&#8220;Tags Within Tags&#8221;<\/i> for local client files (ie. on your client laptop or desktop or mobile (as applicable) hard disk (as applicable)) so that a webpage or web application acts a lot like a desktop program with those ever so familiar <i>&#8220;Browse&#8230;&#8221;<\/i> button scenarios (hopefully you forget you are on the web).<\/p>\n<p>How these changes affected the code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php--GETME\" title='tags_within.php'>tags_within.php<\/a> link.<\/p>\n<p>How these changes affected the supervisory code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-----------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> link.<\/p>\n<p>So maybe you should recap the story as below, as to why we are doing this &#8230; <\/p>\n<p>Sometimes to make a program practically useful you have to take a pause after the proof of concept stage and ask &#8220;would you be happy using this program if there was a deadline&#8221;.  Yesterday&#8217;s version of our <i>&#8220;Tags Within Tags&#8221;<\/i> program would probably not have passed this test, but today&#8217;s more open version may go some way further down that track.   Today we take yesterday&#8217;s <a target=_blank href='#pnerpt' title='PHP Nested Elements Report Primer Tutorial'>PHP Nested Elements Report Primer Tutorial<\/a> as shown below and extend it so that the report can be run with the one lot of interactive input for more than one URL at once, so, in order to open up the program, but still shield from a bombardment of this rjmprogramming.com.au&#8217;s web server (we hope), we open up the functionality to allow:<\/p>\n<ul>\n<li>a comma separated list of URLs<\/li>\n<li>the analysis of local <i>(rjmprogramming.com.au web server)<\/i> files in a list and\/or as a filespec using the file:\/\/ prefix syntax to specify a local file, along with the use of wildcards such as <i>*<\/i> to specify a filespec of files of interest &#8230; say <i>(rjmprogramming.com.au web server)<\/i> because if you run this from the <i>rjmprogramming.com.au<\/i> domain the word <i>local<\/i> means <i>rjmprogramming.com.au<\/i>&#8216;s web server, but if you were to download the code further below and implement it onto a local (MAMP) web server, for instance, <i>local<\/i> could make (the meaning of) <i>file:\/\/<\/i> refer to directories of your local (Mac laptop) disk<\/li>\n<\/ul>\n<p>Yet to come is software integration to hook into the local client file system access to files that we could examine &#8230; see <a target=_blank title='PHP\/Javascript Replace String File Browsing Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10545'>PHP\/Javascript Replace String File Browsing Tutorial<\/a> &#8230; maybe tomorrow?!<\/p>\n<p>How these changes affected the code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php-GETME\" title='tags_within.php'>tags_within.php<\/a> link.<\/p>\n<p>Let&#8217;s, below, recap the whole premise of the program &#8230; chow for now &#8230;<\/p>\n<p>Lots of data is hierarchical by nature.   Examples are HTML or XML or JSON data, and to get a report on tag types nested within other tag types can be a useful tool to sanity check that your data is well structured, or is valid, perhaps.<\/p>\n<p>Because our input is a data file today (ie. implicitly, a URL amounts to a data file, somewhere, on a web server), we will need a server side language to work the functionality, though I daresay, <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> techniques may be okay to use too, because we are not writing files, as such, here, today, but just reporting on files &#8230; subtle difference, but important, because Ajax techniques can read file data, but cannot write to files &#8230; the writing to files (on the <a target=_blank title='Web sever information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_server'>web server<\/a>) is where PHP (or ASP.Net) or other server side languages really need to be used.<\/p>\n<p>With XML data in particular, data element <i>attributes<\/i> are often used as a place to contain important business logic that affects the structure of your data, so, here, with our PHP, we allow a simple arrangement, where if you can specify a unique <i>attribute<\/i> search string, then you can narrow down the parent tag scope of interest, to those only containing this <i>attribute<\/i> search string &#8230; and I guess you could <i>kludge<\/i> this for HTML data, perhaps with a unique <i>classname<\/i> or <i>id<\/i> or <i>style= property<\/i> perhaps.<\/p>\n<p>You are welcome trying it here with a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<p>You are also welcome trying its supervisor here with a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture of some time back\">supervisory live run<\/a>.<\/p>\n<p>Here is a tailored call of the PHP that matches what is on today&#8217;s tutorial&#8217;s picture as a <a target=_blank title='Google live run' href='http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php?url=http%3A%2F%2Fwww.google.com&#038;ptag=form&#038;ctag=input&#038;attrib=&#038;start=%3C&#038;end=%3C%2F&#038;submit=Report'>live run<\/a> you can try to search the Google search engine landing webpage&#8217;s <i>input<\/i> tags nested within <i>form<\/i> tags, as an example of things you can try &#8230; hope it can be of interest, or help.<\/p>\n<p>You can download PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php--GETME\" title='tags_within.php'>tags_within.php<\/a> here.<\/p>\n<p>You can download supervisory PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php-----------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> here.<\/p>\n<hr \/>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/flatten_ml.php\"><img decoding=\"async\" id='jfsqxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP HTML\/XML to Text Conversion Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/flatten_ml.jpg\" title=\"PHP HTML\/XML to Text Conversion Tutorial\" id=\"qwpnerpt\"  \/><\/a><p class=\"wp-caption-text\">PHP HTML\/XML to Text Conversion Tutorial<\/p><\/div>\n<p>The design of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/flatten_ml.php\" title=\"Click picture\">tutorial<\/a> has so much in common, as far as inputs and process go, that we base the software coding on yesterday&#8217;s <a target=_blank href=\"#pnercft\" title=\"PHP Nested Elements Report Client Files Tutorial\">PHP Nested Elements Report Client Files Tutorial<\/a> as it is easier to plug in new business logic into appropriate places with tested environmental arrangements &#8230; a few less things to worry about.<\/p>\n<p>How this progression came about with the code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/flatten_ml.php-GETME\" title='flatten_ml.php'>flatten_ml.php<\/a> link.<\/p>\n<p>How these changes affected the supervisory code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> link.<\/p>\n<p>So with today&#8217;s web application you browse for files via a Browse button (for local client files) or URLs or file:\/\/ prefixed fiespecs for the rjmprogramming.com.au domain for HTML or XML files, which get &#8220;flattened out&#8221; in a conversion to text data.<\/p>\n<p>Of great help was this <a target=_blank title='Useful link' href='http:\/\/stackoverflow.com\/questions\/5002111\/javascript-how-to-strip-html-tags-from-string'>link<\/a> &#8230; thanks.<\/p>\n<p>You can download PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/flatten_ml.php-GETME\" title='flatten_ml.php'>flatten_ml.php<\/a> here.<\/p>\n<p>You can download supervisory PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php------------GETME\" title='fileinfotable.php'>fileinfotable.php<\/a> here or use a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title='fileinfotable.php'>supervisory live run<\/a> link.   Hope you get some ideas from today&#8217;s posting.   See ya&#8217; later, Alli Gator.<\/p>\n<hr \/>\n<p id='pnerfut'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10744' title='PHP Nested Elements Report Follow Up Tutorial'>PHP Nested Elements Report Follow Up Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\"><img decoding=\"async\" id='sqxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP Nested Elements Report Client Files Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tag_within_more.jpg\" title=\"PHP Nested Elements Report Client Files Tutorial\" id=\"pnerpt\" onmouseover=\" this.src=this.src.replace('.jpg','.GIF').replace('.png','.jpg').replace('.gif','.png').replace('.GIF','.gif');     \"  \/><\/a><p class=\"wp-caption-text\">PHP Nested Elements Report Client Files Tutorial<\/p><\/div>\n<p>Sometimes to make a program practically useful you have to take a pause after the proof of concept stage and ask &#8220;would you be happy using this program if there was a deadline&#8221;.  Yesterday&#8217;s version of our <i>&#8220;Tags Within Tags&#8221;<\/i> program would probably not have passed this test, but today&#8217;s more open version may go some way further down that track.   Today we take yesterday&#8217;s <a target=_blank href='#pnerpt' title='PHP Nested Elements Report Primer Tutorial'>PHP Nested Elements Report Primer Tutorial<\/a> as shown below and extend it so that the report can be run with the one lot of interactive input for more than one URL at once, so, in order to open up the program, but still shield from a bombardment of this rjmprogramming.com.au&#8217;s web server (we hope), we open up the functionality to allow:<\/p>\n<ul>\n<li>a comma separated list of URLs<\/li>\n<li>the analysis of local <i>(rjmprogramming.com.au web server)<\/i> files in a list and\/or as a filespec using the file:\/\/ prefix syntax to specify a local file, along with the use of wildcards such as <i>*<\/i> to specify a filespec of files of interest &#8230; say <i>(rjmprogramming.com.au web server)<\/i> because if you run this from the <i>rjmprogramming.com.au<\/i> domain the word <i>local<\/i> means <i>rjmprogramming.com.au<\/i>&#8216;s web server, but if you were to download the code further below and implement it onto a local (MAMP) web server, for instance, <i>local<\/i> could make (the meaning of) <i>file:\/\/<\/i> refer to directories of your local (Mac laptop) disk<\/li>\n<\/ul>\n<p>Yet to come is software integration to hook into the local client file system access to files that we could examine &#8230; see <a target=_blank title='PHP\/Javascript Replace String File Browsing Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10545'>PHP\/Javascript Replace String File Browsing Tutorial<\/a> &#8230; maybe tomorrow?!<\/p>\n<p>How these changes affected the code can be seen with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php-GETME\" title='tags_within.php'>tags_within.php<\/a> link.<\/p>\n<p>Let&#8217;s, below, recap the whole premise of the program &#8230; chow for now &#8230;<\/p>\n<p>Lots of data is hierarchical by nature.   Examples are HTML or XML or JSON data, and to get a report on tag types nested within other tag types can be a useful tool to sanity check that your data is well structured, or is valid, perhaps.<\/p>\n<p>Because our input is a data file today (ie. implicitly, a URL amounts to a data file, somewhere, on a web server), we will need a server side language to work the functionality, though I daresay, <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> techniques may be okay to use too, because we are not writing files, as such, here, today, but just reporting on files &#8230; subtle difference, but important, because Ajax techniques can read file data, but cannot write to files &#8230; the writing to files (on the <a target=_blank title='Web sever information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_server'>web server<\/a>) is where PHP (or ASP.Net) or other server side languages really need to be used.<\/p>\n<p>With XML data in particular, data element <i>attributes<\/i> are often used as a place to contain important business logic that affects the structure of your data, so, here, with our PHP, we allow a simple arrangement, where if you can specify a unique <i>attribute<\/i> search string, then you can narrow down the parent tag scope of interest, to those only containing this <i>attribute<\/i> search string &#8230; and I guess you could <i>kludge<\/i> this for HTML data, perhaps with a unique <i>classname<\/i> or <i>id<\/i> or <i>style= property<\/i> perhaps.<\/p>\n<p>You are welcome trying it here with a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<p>You are welcome trying a supervisory way with a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/fileinfotable.php\" title=\"Click picture from some time back\">supervisory live run<\/a>.<\/p>\n<p>Here is a tailored call of the PHP that matches what is on today&#8217;s tutorial&#8217;s picture as a <a target=_blank title='Google live run' href='http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php?url=http%3A%2F%2Fwww.google.com&#038;ptag=form&#038;ctag=input&#038;attrib=&#038;start=%3C&#038;end=%3C%2F&#038;submit=Report'>live run<\/a> you can try to search the Google search engine landing webpage&#8217;s <i>input<\/i> tags nested within <i>form<\/i> tags, as an example of things you can try &#8230; hope it can be of interest, or help.<\/p>\n<p>You can download PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php-GETME\" title='tags_within.php'>tags_within.php<\/a> here.<\/p>\n<hr \/>\n<p id='pnerpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=10729' title='PHP Nested Elements Report Primer Tutorial'>PHP Nested Elements Report Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\"><img decoding=\"async\" id='qxmximgjoptionpane'  style=\"float:left; border: 15px solid pink;\" alt=\"PHP Nested Elements Report Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.jpg\" title=\"PHP Nested Elements Report Primer Tutorial\" id=\"pnerpt\" onmouseover=\" this.src=this.src.replace('.jpg','.GIF').replace('.png','.jpg').replace('.gif','.png').replace('.GIF','.gif');     \"  \/><\/a><p class=\"wp-caption-text\">PHP Nested Elements Report Primer Tutorial<\/p><\/div>\n<p>Lots of data is hierarchical by nature.   Examples are HTML or XML or JSON data, and to get a report on tag types nested within other tag types can be a useful tool to sanity check that your data is well structured, or is valid, perhaps.<\/p>\n<p>Because our input is a data file today (ie. implicitly, a URL amounts to a data file, somewhere, on a web server), we will need a server side language to work the functionality, though I daresay, <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> techniques may be okay to use too, because we are not writing files, as such, here, today, but just reporting on files &#8230; subtle difference, but important, because Ajax techniques can read file data, but cannot write to files &#8230; the writing to files (on the <a target=_blank title='Web sever information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Web_server'>web server<\/a>) is where PHP (or ASP.Net) or other server side languages really need to be used.<\/p>\n<p>With XML data in particular, data element <i>attributes<\/i> are often used as a place to contain important business logic that affects the structure of your data, so, here, with our PHP, we allow a simple arrangement, where if you can specify a unique <i>attribute<\/i> search string, then you can narrow down the parent tag scope of interest, to those only containing this <i>attribute<\/i> search string &#8230; and I guess you could <i>kludge<\/i> this for HTML data, perhaps with a unique <i>classname<\/i> or <i>id<\/i> or <i>style= property<\/i> perhaps.<\/p>\n<p>You are welcome trying it here with a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php\" title=\"Click picture\">live run<\/a>.<\/p>\n<p>Here is a tailored call of the PHP that matches what is on today&#8217;s tutorial&#8217;s picture as a <a target=_blank title='Google live run' href='http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php?url=http%3A%2F%2Fwww.google.com&#038;ptag=form&#038;ctag=input&#038;attrib=&#038;start=%3C&#038;end=%3C%2F&#038;submit=Report'>live run<\/a> you can try to search the Google search engine landing webpage&#8217;s <i>input<\/i> tags nested within <i>form<\/i> tags, as an example of things you can try &#8230; hope it can be of interest, or help.<\/p>\n<p>You can download PHP programming source code and rename to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/tags_within.php_GETME\" title='tags_within.php'>tags_within.php<\/a> here.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10729' onclick='var dv=document.getElementById(\"d10729\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=hierarchy\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10729' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10744' onclick='var dv=document.getElementById(\"d10744\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=XML\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10744' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d10759' onclick='var dv=document.getElementById(\"d10759\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=API\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d10759' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d11018' onclick='var dv=document.getElementById(\"d11018\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=slideshow\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11018' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr \/>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d11018' onclick='var dv=document.getElementById(\"d11018\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=gallery\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d11018' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The design of today&#8217;s PHP Dynamic Gallery tutorial has so much in common, as far as inputs and process go, with PHP\/Javascript Dynamic Slideshow Primer Tutorial as shown below, that we base the software coding on it, happily building on &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascript-dynamic-gallery-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12,37],"tags":[475,576,590,652,932,997,1319],"class_list":["post-11037","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-tutorials","tag-gallery","tag-html","tag-image","tag-javascript","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/11037"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=11037"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/11037\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=11037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=11037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=11037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}