Jump to content

[SOLVED] Help with multiplication code


jorge.chavez

Recommended Posts

Hi, I am learning php, I have this code for a multiplication table and is not displaying anything, please let me know what is wrong

 

<html>

<head>

<title>multiplication table</title>

</head>

<body>

<?php

print"<table border="1">\n";

for ($y=1;$y<=12;$y++)

{

print"<tr>\n";

for( $x=1; $x<=12; $x++)

{

print"\t<td>";

print ($x*$y);

print "</td>\n";

}

print "</tr>\n";

}

print "</table>";

?>

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/46142-solved-help-with-multiplication-code/
Share on other sites

backslash escapes that character, like for example if you have ' string's'      its an apostrophe, but you coud go  'string\'s or "string's"  its the same thing

but for longer strings and that, the backslash should be used

 

youll also see it in \n, newline \t ( tab i think)

 

its al over the place

 

 

glad its working

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.