Welcome Guest, Not a member yet? Register   Sign In
Basic PHP question
#2

If you only need HTML, just write HTML code. If you need to output the content of a variable or you need some logic, them use PHP to output your HTML code.

For example:
PHP Code:
<h1>My blog</h1>
<
h2><?= $title ?></h2>
<?php if ( ! empty($article)) : ?>
<p><?= $article ?></p>
<?php endif; ?>
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
Basic PHP question - by ronniebel - 08-06-2019, 04:22 PM
RE: Basic PHP question - by includebeer - 08-06-2019, 05:14 PM
RE: Basic PHP question - by John_Betong - 08-06-2019, 11:12 PM
RE: Basic PHP question - by albertleao - 08-06-2019, 11:20 PM
RE: Basic PHP question - by includebeer - 08-07-2019, 02:57 AM
RE: Basic PHP question - by dave friend - 08-07-2019, 06:28 AM
RE: Basic PHP question - by John_Betong - 08-08-2019, 09:27 AM
RE: Basic PHP question - by includebeer - 08-08-2019, 10:12 AM
RE: Basic PHP question - by dave friend - 08-08-2019, 12:10 PM
RE: Basic PHP question - by kilishan - 08-08-2019, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB