0

I'm trying to print some data in tables by using the below code (not entire code) but it's giving error. If I remove the table then I'm able to print the output. Can anybody help me with this?

print "<table border="1">\n";
while(my $ref = $sth->fetchrow_hashref()) {
print "<tr>\n";
print "<td>\n ";
print "$ref->{'name'} owns $ref->{'telno'}\n";
print "</td>\n";
print "</tr>\n";
}
print "</table>\n";

1 Answer 1

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

Don't you need to escape those inner double quotes?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.