PHP Knowledge Base

Loop through a multidimensional array

foreach ($occupancy_info as $bed) {
	echo "<p>$bed<br>";
	foreach ($bed as $key => $info) {
		echo "  $key: $info<br>";
	}
	echo "</p>";
}