Help me with this PHP code

Discussion in 'PHP' started by SilverCake, Jul 2, 2009.

  1. #1
    Website video script.....

    here's the function

    function get_list_by_tag($tag,$page,$per_page,$sort){
    	$orderby=$sort;
    	$tag=str_replace(" ","+",$tag);if($page>3){$page=1;}
    	$xml_data = file_get_contents("http://gdata.youtube.com/feeds/api/videos?vq=$tag&start-index=".(($page-1)*10+1)."&max-results=$per_page&orderby=$sort");
    	$xml_data=str_replace("<title type='text'>","<title>",$xml_data);
    	$xml_data=str_replace("<content type='text'>","<content>",$xml_data);
    	$xmlObj = new XMLParser($xml_data);
    	$arrayData = $xmlObj->createArray();
    Code (markup):
    if((empty($_GET['video']) or $_GET['video']=="") and empty($_GET['tag'])){
    	echo prepare_and_show("",get_list_by_tag($tag_by_default,1,10,"relevance"));
    }
    
    Code (markup):
    $tag_by_default refers to config.php where the KEYWORD (for the videos) tags are.

    As of now, the tags are showing along with the videos. I want the tags removed, but cant figure out what/how to take em out.

    $page,$per_page,$sort are ok, juts dont want $tags DISPLAYED

    Any help appreciated!
     
    SilverCake, Jul 2, 2009 IP