Category : xml

Here is my code, where I get my information for the Xml from the DB with sql. BUT I have also an array $order that contains a lot of information I need and I want to add it to the Xml file that I am saving here. How can I do that? Thanks. $sql = ..

Read more

My Rss That has link to my episode image : <itunes:image href="https://d3t3ozftmdmh3i.cloudfront.net/production/podcast_uploaded_nologo/19641917/19641917-1637668693797-44b27f4c00a16.jpg"/> <?php $url = "https://anchor.fm/s/75abc654/podcast/rss"; $invalidurl = false; if(@simplexml_load_file($url)){ $feeds = simplexml_load_file($url); }else{ $invalidurl = true; echo "<h2>Invalid RSS feed URL.</h2>"; } $i=0; if(!empty($feeds)){ $site = $feeds->channel->title; $sitelink = $feeds->channel->link; foreach ($feeds->channel->item as $item) { $title = $item->title; $link = $item->link; $description = $item->description; ..

Read more

I would like to know if there is any way, in php, to match all classes with the same word, Example: <div class="classeby_class"> <div class="classos-nope"> <div class="row"> <div class="class-show"></div> </div> </div> </div> <div class="class-first-one"> <div class="container"> <div class="classes-show"> <div class="class"></div> <div class="classing"></div> </div> </div> </div> in the example above I would like to match all ..

Read more

I have this dropdown option, after choosing an option I have to fetch the values from the XML file. Suppose if I choose "Products > Product > LongDescription" then fetch all the values of "LongDescription" from the XML file like following array ( 0=>’Don’t forget me this weekend!’, 1=>null, 2=>null, 3=>’Test description’ ) XML File ..

Read more

$xml = <<<XML <div class="totals-value" id="cart-total"></div> XML; $sxe = new SimpleXMLElement($xml); echo $sxe; This is the PHP code. The content in the .totals-value comes through javascript: $(‘.totals-value’).fadeOut(fadeTime, function() { $(‘#cart-subtotal’).html(subtotal.toFixed(1)); $(‘#cart-shipping’).html(shipping.toFixed(1)); $(‘#cart-total’).html(total.toFixed(1)); if (total == 0) { $(‘.checkout’).fadeOut(fadeTime); } else { $(‘.checkout’).fadeIn(fadeTime); } $(‘.totals-value’).fadeIn(fadeTime); }); Sourc..

Read more