mc_keny Posted December 9, 2007 Share Posted December 9, 2007 hey guys am new to xhtml i have this doc type <?phpecho "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" ."\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\ ">";?> but it say unexpected $ i dont see any error in it though Link to comment Share on other sites More sharing options...
boen_robot Posted December 9, 2007 Share Posted December 9, 2007 Do yourself a favor and use single quotes for this one, or write the DTD directly if possible.Use single quotes like so: <?php echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; ?> Link to comment Share on other sites More sharing options...
zppblood Posted December 9, 2007 Share Posted December 9, 2007 Listen to boen_robot. I'm sure the problem is here:transitional.dtd\ ">" You have a space between \ and ", so it's not escaping the " and will give you an error. Link to comment Share on other sites More sharing options...
mc_keny Posted December 9, 2007 Author Share Posted December 9, 2007 thats bro i did and there is no error this time just this Free web hosting by 100WebSpace.com free web space | reseller hosting | web hosting | dating | report abuse | links webhosting | WebMaster Sales Resources | website hosting | free web hosting | hosting | OpenHost Meet People - Make Money! Online Multi-Matchmaking community where you get paid to build relationships. Mobile SMS Marketing Reach your customers at any time & place Market on a one-to-one basis. Free Web Space + Free PHP Scripts Free php, mysql & perl web hosting. 29 Free PHP scripts with 1-click installations. when ever i use wml that doesn't appear if i add a text in the body section it show but the message still remains above Link to comment Share on other sites More sharing options...
Synook Posted December 10, 2007 Share Posted December 10, 2007 Er? That looks like the sort of page that hosts put when they can't find a page... Link to comment Share on other sites More sharing options...
Anders Moen Posted December 10, 2007 Share Posted December 10, 2007 Well, what's the point with putting the doctype in an echo like that?And you need to escape " and ' if it's like that;Escape: echo ' \' ';No need to escape: echo ' " ';Escape: echo " \" ";No need to escape: echo " ' ";Hope you understood anything of that lol Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.