MyBB Community Forums

Full Version: PHP help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok im am trying to create a simple online/offline streams page for my website but im not very good at PHP. Basically What I am trying to do is have a list of live streams on the pro portal block on the main page. I've almost got what I wanted but can not figure out how to make a <br> between the names who are active.

<?php
/***************************************************************
 * ProPortal
 * Copyright © 2010 ProMyBB, All Rights Reserved
 *
 * Website: http://www.promybb.com/
 * License: http://creativecommons.org/licenses/by-nc-sa/3.0/
 ***************************************************************/
 
	$chan = "";
	$streams = array(
	"puttly", "angrytestie", "TARFU", "milfhunter", "gorgenzola", "steven_bonnell_ii"
	);
	echo "";
	foreach ($streams as &$i) {
		$chan = "http://api.justin.tv/api/stream/list.json?channel=" . $i;
		$json = file_get_contents($chan);
		$exist = strpos($json, 'name');
		if($exist) {
			echo " <a href=\"http://justin.tv/" . $i . "\"> <strong>" . $i . "</a></strong>";
		}

	}
	echo "</span><br />";
	
?>
echo "</span>\n";

\n not <br />