HTML W3 validtion with PHP in the source help

Maybe I can get an opinion or two about doing an HTML validation on the W3’site
when I have php in the source.

Generally I do an html evauation and get rid of all of ALL the xhtml errors.
I then am left with those ‘errors’ caused by the php built in that does
some needed things but confuses the W3 evaluation tool.

As an eample just including a line like,

<?=$MAP_OBJECT->printMap(); ?>

which calls a php object to print causes numerous errors and warnings
by the W3 tool.

And an ‘html’ line like this…

<? echo " " ?>

which generates a ‘calculated’ name tag from records in the mysql database
as the page runs.

But ths drives the W3 tool nuts.

Now if I comment out all the ‘offending’ code that is being casused by the
perfectly WORKING php code, the page PASSES the W3 html evalator.

So… what I’m wondering is how do YOU evaluate your html pages that
have php built in? I’ve tried several different evaluators and none seem
to be able to correctly evaluate a page unless I comment out the php
code.

eatc7402

If you let the PHP run and validate the resulting HTML ( so the HTML the client will receive and not the original PHP file ) there shouldn’t be any problems.

Hope this helps,
O.

Well Iwonder just how you do that. I’ve got files with thousands of lines
pf php buried in the raw html. Could you give a small idea of the steps
to take.

eatc7402

Sponsor our Newsletter | Privacy Policy | Terms of Service