POPEYE1716 Posted February 16, 2015 Share Posted February 16, 2015 Hello, So I need to convert PHP code to JSP/Java. I really don't understand PHP and would like an explanation as to what this code is doing. So I can convert it, any help would be great thank you it's only 4 lines of code sitemap.php Attached PHP file Link to comment https://forums.phpfreaks.com/topic/294655-help-understanding-php-code/ Share on other sites More sharing options...
CroNiX Posted February 17, 2015 Share Posted February 17, 2015 It's best to just post the code so here it is. <?php $xml_string = file_get_contents($_REQUEST['url']); $xml = simplexml_load_string($xml_string); $json = json_encode($xml); echo $json; ?> Link to comment https://forums.phpfreaks.com/topic/294655-help-understanding-php-code/#findComment-1505854 Share on other sites More sharing options...
scootstah Posted February 17, 2015 Share Posted February 17, 2015 Did you bother looking at the manual? I mean, one could probably guess with a reasonable amount of accuracy what this code does just by the name of the functions. Link to comment https://forums.phpfreaks.com/topic/294655-help-understanding-php-code/#findComment-1505860 Share on other sites More sharing options...
POPEYE1716 Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks scootstah, this really helped. Link to comment https://forums.phpfreaks.com/topic/294655-help-understanding-php-code/#findComment-1505861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.