Trying to use a PHP function within my HTML code but as a comment It keeps on treating this block! (Green in color source and if there is no output), though I have used the same function in another function and it worked fine even within the HTML ...
function x () {$ X = 'hello'; Echo ('& lt; marquee direction = "left" scrollamount = "3" behavior = "scroll" style = "width: 300px; height: 15px; font-size: 11px;" & gt;'); Echo $ x; Echo '& lt; / Marquee & gt; '; } & Lt ;? Php echo x (); ? & Gt; Using HTML file I have a template that I found online ... any suggestions for what I should check? Thanks!
What will be the job here:
& lt; Php function x () {$ x = 'hello'; Echo ('& lt; marquee direction = "left" scrollamount = "3" behavior = "scroll" style = "width: 300px; height: 15px; font-size: 11px;" & gt;'); Echo $ x; Echo '& lt; / Marquee & gt; '; } X (); // No resonance, because the function does not return any value. ? & Gt; This is a slightly better version:
& lt ;? Php function x ($ message) {$ html = '& lt; Marquee direction = "left" Scrollamount = "3" behavior = "scroll" style = "width: 300px; height: 15px; font-size: 11px;" & Gt; '. $ Message. ' & Lt; / Marquee & gt; '; Return $ Html; } Echo x ('hello'); ? & Gt;
Comments
Post a Comment