Can I ask why in the first example the functions are placed inside a div and in the second they are not?
Code: Select all
echo '<div class="post-title">'.$post['title'].'</div>';
Code: Select all
$postTitle = $post['title'];
Code: Select all
echo '<div class="post-title">'.$post['title'].'</div>';
Code: Select all
$postTitle = $post['title'];
I do not really understand your question... Can you please give an example of "place the functions on separate lines without using divs".nootkan wrote:Yes I understand why a div is used in html but I just didn't understand why php doesn't need it to place the functions on separate lines without using divs.