Why we use \ ( backslash ) in table php

PaulTheTree

New Member
I have created one function, Here is my code so far\[code\]function create_table2($data, $border=1, $cellpadding=4, $cellspacing=4 ) { echo "<table border=\"".$border."\" cellpadding=\"".$cellpadding."\" cellspacing=\"".$cellspacing."\">"; reset($data); $value = http://stackoverflow.com/questions/15746023/current($data); while ($value) { echo"<tr><td>".$value."</td></tr>\n"; $value = http://stackoverflow.com/questions/15746023/next($data); } echo"</table>";}$my_array = array('Line one.','Line two.','Line three.');create_table2($my_array, 3, 8, 8);\[/code\]This function also works fine without \ Backslash ...for example if i put this code \[code\]echo "<table border=".$border." cellpadding=".$cellpadding." cellspacing=".$cellspacing.">";\[/code\]My Question is why we put \ Backslash inside the table ... any specific reason?
 
Back
Top