-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
  • 277
  • 6
  • 19

1 Answers1

2

You need to escape it with another %:

<table width="100%%"....
John Conde
  • 217,595
  • 99
  • 455
  • 496