For Loop table PHP


I want to create a table with For loop. As an example I added table created with JavaScript I did before. Firstly I changed the variables ($variable_name=value;) and then the output - echo. I don’t know what mission or wrong. The only output I get is zeros.

This is the output I get:

	<meta charset="UTF-8"/>
			* {
				margin: 0;
				padding: 0;
				box-sizing: border-box;
			table,td {
				border: 1px solid grey;
				border-collapse: collapse;
				margin: 10px;

			img {
				display: block;
			td {
				border: 1px solid grey;
				width: 33px;
				height: 33px;
				background-color: silver;

<script type="text/javascript">
			var r = 10; //vrstica tr
			var c = 10; //stoplec td

			document.write('<table id=box>');
			for(i=1;i<=r;i++) {
				for(j=1;j<=c;j++) {
					document.write("<td>"+" "+"</td>");
		echo "<p> 10x10 table </p> ";
		echo ("<table id=box>");
			for($i=1;$i<=$r;$i++) {
				echo ("<tr>");
				for($j=1;$j<=$c;$j++) {
					echo ("<td>"+" "+"</td>");
				echo ("</tr>");
			echo ("</table>");


php use . for concatenation, not +.

You should do some basic PHP syntax tutorials.