Urup Posted September 15 Share Posted September 15 I'm looking for some help with simple PHP coding, I think it's called . I process simple data from one program to another to display it on an info screen. I have some problems with setting up the setup itself which is a bit messy after many changes. Hope someone can make it together with me so it will be simpler to change. Simple things like margins and line breaks. Such simple data as this to be processed <OmraadeRengoering Status="ok"> <Aktivitet> <Tidsrum>01:10-23:00</Tidsrum> <Navn>Engen</Navn> <Kontaktgruppe>Christina S. og Peter</Kontaktgruppe> </Aktivitet> </OmraadeRengoering> I know I just attach screen clips with why it is displayed incorrectly the messy code that has been written. However, it is with another link than the right one, as I do not want to write it here https://drive.google.com/drive/folders/1Yw3OU642WLP_wQfgjiFlz7hc_gtye_BB?usp=sharing Quote Link to comment https://forums.phpfreaks.com/topic/324078-hoping-for-help-with-simple-programming-think-its-php/ Share on other sites More sharing options...
requinix Posted September 16 Share Posted September 16 It's better to paste the (relevant) code, and/or screenshots for stuff that's visual, directly into your post: most people here try to keep safe and so won't download random files from strangers on the internet. That stuff you included there is XML, and it's easy to read with PHP. But you're talking about margins and line breaks, which isn't actually PHP, though the line between what is and isn't PHP does get a little blurry sometimes. Can you give a more detailed description about what you're doing, what you've written so far, what happens when you run it, and what you were expecting it to do instead? Remembering to post code as you go, of course. 1 Quote Link to comment https://forums.phpfreaks.com/topic/324078-hoping-for-help-with-simple-programming-think-its-php/#findComment-1635360 Share on other sites More sharing options...
jodunno Posted September 17 Share Posted September 17 Are you still with us? requinix is a pro. You are in good hands. Meantime, margins is interesting because do you want margins or not? I see a double break after the body tag. <body><br><br/> incidentally, html5 does not require the ending slash. vide xhtml. since you are already using css, why not add margin control? <span style="font-family:'Comic Sans MS', Comic, Monospace; margin: 8px 8px"> the center tag is deprecated, is it not? Again, why not use css? align: center; text-align: center; let us know if you need further assistance. I will also post the entire script from the google drive link. I hope that it is okay to do so. Please forgive me if it is not okay to post the aftenrenlille.php code. <?php ini_set('default_socket_timeout', 5); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>AU-INFO</title> <style type="text/css"> #dagensret{ //font-size:10px; } .food{ // color: green; font-size:15px; } </style> </head> <body><br><br/> <span style="font-family:'Comic Sans MS', Comic, Monospace"> <center> <span style="font-size:25pt"> <?php // 11 // remember to remove the ; from the beginning of extension=php_soap.dll in php.ini $cli= new SoapClient('https://xxxxxxxxxxx.dk/SPService.asmx?WSDL'); //$res = $cli->__soapCall('DagensMenu',array()); // $xmlstr = $res->DagensMenuResult->any; $simple = simplexml_load_string($xmlstr); $text = $simple->Menu->Tekst; echo "AFTENRENGØRING "; echo $text.""; ?> <!--Overskrift--> <span style="font-size:10pt"> <!--Overskrift--> <!--Vegatare--> <span style="font-size:25pt"> <!---> <?php $simple = simplexml_load_file('https://xxxxxxxxxxx/SPService.asmx/AktuelleOmraadeRengoering'); $text = $simple->Aktivitet->Navn; // slette + tegn AU $text = str_replace('+', '', $simple->Aktivitet->Navn); echo $text; ?> </body> </html> <!--Menu herover--> </html> 1 Quote Link to comment https://forums.phpfreaks.com/topic/324078-hoping-for-help-with-simple-programming-think-its-php/#findComment-1635425 Share on other sites More sharing options...
Urup Posted September 30 Author Share Posted September 30 Hello I don't know why, but I only got an email yesterday saying that I had received a reply... Sorry. I have solved the problem. Thank you for your time Quote Link to comment https://forums.phpfreaks.com/topic/324078-hoping-for-help-with-simple-programming-think-its-php/#findComment-1636473 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.