enovatit Posted July 31, 2010 Share Posted July 31, 2010 Hello Freaks! I am having problem with following code: <?php simplexml_load_string ('?xml version="1.0" encoding="utf-8"?>'); php?> This code is giving me following error Parse error: syntax error, unexpected '<' in public_html/wp-content/plugins/pluginnamehere/whatever.php on line 665 I know there is only a minor bracket problem that causing me this error. I would be helpful to you if you can modify it for me Thanks Quote Link to comment https://forums.phpfreaks.com/topic/209414-getting-parse-error-simple-code-modification-needed/ Share on other sites More sharing options...
harristweed Posted July 31, 2010 Share Posted July 31, 2010 you need some content between a set of tags...... <?php $xml=simplexml_load_string ('<?xml version="1.0" encoding="utf-8"?><title>where is the content?</title>'); print_r($xml); ?> Quote Link to comment https://forums.phpfreaks.com/topic/209414-getting-parse-error-simple-code-modification-needed/#findComment-1093452 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.