LegoMyGeggo Posted February 14, 2014 Share Posted February 14, 2014 Hi Everyone, Just had a quick question regarding chapter 3; script 3.7. More specifically when we're learning about creating functions for ads for the linked webpages. My question relates to when we use the function in relation to when we use the include function. When I add my create_ad() function after I do include(includes/header.html) it prints out "This is an annoying ad!" formatted according to the template. However, if I add the function before the include it just displays it on the top left of the page. So is the reason why it gets formatted because when we use the include function, it is placing the css code within the index.php and then reading the function whereas if I place it before, then technically it would be outside the scope of the included page? Just needed a little clarification, thanks! Best, G Link to comment Share on other sites More sharing options...
abigail Posted February 14, 2014 Share Posted February 14, 2014 I believe that is the reason, without looking at the code. Very likely, the css is the difference. Link to comment Share on other sites More sharing options...
HartleySan Posted February 14, 2014 Share Posted February 14, 2014 Lego, could you please provide the relevant code? Link to comment Share on other sites More sharing options...
Recommended Posts