html - PHP print problems -


hi i'm using script scan directory mp3 files , print results other information surrounding each item found can populate app works fine if try print <> doesn't show these

<?php // *** requires php5 *** // search jpg files  $filter = ".mp3"; // url added path *** no trailing slash *** $url = 'http://********'; // path directory want scan $directory = './'; $it = new recursivedirectoryiterator("$directory"); foreach(new   recursiveiteratoriterator($it) $file) {   if (!((strpos(strtolower($file), $filter)) === false))   {     $items[] = preg_replace(array("#\\\#", "#./#"), array("/", "/"), $file);   } } sort($items);  print <<<end <music> end;   foreach($items $item) {   $title_array = explode('/', $item);   $title = substr(end($title_array), 0, (strlen(end($title_array)) - 4));   print <<<end   new audiotrack(new uri("$url$item",urikind.absolute), "$title", null, null, null),  end; }   print <<<end </music>   end;   ?> 

the code i'm wanting print same except in print section i'm after

<print ><item> <title>$title</title> <link>$url$item</link> <description>album name</description> <guid ispermalink="false">$url$item</guid> <enclosure type="audio/mpeg" url="$url$item" /> </item> 

thanks in advance


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -