Jump to content

echo html in php


fife

Recommended Posts

I have written this code but im not used to echoing html in php so I have errors.

echo " <option value= '{$county['county']}'" if ($User['county'])==$county['county']) {echo "selected";}  echo">{$county['county']}</option>";
}

 

 

the server error is;

 

 

syntax error, unexpected T_IF, expecting ',' or ';'

 

Can somebody please point out how I have written it wrong?

Link to comment
https://forums.phpfreaks.com/topic/228687-echo-html-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.