-3

I am using sprintf on some html that contains a table:

<table width="100%"....

It seems that % symbol is causing warnings. How do I properly escape that character?

Doing

<table width="100%%"....

Strips the trailing " as well as the % symbol giving me

<table width="100 border="0"...
Bernard Lechler
  • 247
  • 5
  • 19

1 Answers1

2

You need to escape it with another %:

<table width="100%%"....
John Conde
  • 207,509
  • 96
  • 428
  • 469