Hi All
I'm having problems printing a string with a % char. Here is the code
line = sprintf("<table width=100% id=%s>\n", $table_id);
I'm getting an not enough parameter error. The % for the 100% is being
mis interepreted as a format char. Though i worked around by coding it
line = sprintf("<table width=100%s id=%s>\n", '%', $table_id);, i think
there should be a way with which the % can be escaped PHP.
The PHP documention does not have any info about this. if anyone has
come accross such problems and found a work around, please help me out.
Thanks
/V
I'm having problems printing a string with a % char. Here is the code
line = sprintf("<table width=100% id=%s>\n", $table_id);
I'm getting an not enough parameter error. The % for the 100% is being
mis interepreted as a format char. Though i worked around by coding it
line = sprintf("<table width=100%s id=%s>\n", '%', $table_id);, i think
there should be a way with which the % can be escaped PHP.
The PHP documention does not have any info about this. if anyone has
come accross such problems and found a work around, please help me out.
Thanks
/V
Comment