Jump to content
You're invited! Join our 4.6 Live Event on ZOOM 6/24 ×

Community

Proper parsing of HTML in a custom PHP block


Dunkstormen
 Share

Recommended Posts

Hi IC Community,

I've recently made a PHP script to query my gameservers for their current status using the built-in blocks feature in IP.Pages.

However all the HTML I'm using is outputted using echo statements. Is it possible in any way to parse it like normal HTML code, instead of having multiple echo statements?

Edited by Dunkstormen
Link to comment
Share on other sites

I'm not sure I'm clear on what you are after. Can you show us the code you're using (feel free to change any details for privacy, etc.) and what you are hoping to change it to as an example?

If you're using a raw PHP block, then yes generally you just echo/print the output. You can use the heredoc syntax if you want to piece components together.

echo <<<EOF
           {$variable1}<br><i>some html</i>{$variable2}
EOF;

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy