• 0

PHP problem


Question

Hey, i have a code like that but it doesnt work... :angry:

<?php
function test_one() {

//Here goes some html code
<center><h4>Hello!</h4></center>
//It ends here but i dont use break for the code...
//Anyhow I've seen such stuff in the IPB Source and cant understand why it doesnt work
//when i call this function ( test_one :angry: )

}
?>

So, can some1 tell me why it doesnt work??? :blink: :x

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Or wrap any html in ?> <?php tags:

&lt;?php
function test_one() {

//Here goes some html code
?&gt;
&lt;center&gt;&lt;h4&gt;Hello!&lt;/h4&gt;&lt;/center&gt;
&lt;?php
//It ends here but i dont use break for the code...
//Anyhow I've seen such stuff in the IPB Source and cant understand why it doesnt work
//when i call this function ( test_one :angry: )

}
?&gt;

Link to comment
Share on other sites

  • 0

ugm...i know such stuff, but i've seen stuff like that in IPB source and it worked well and works...you're using it now :D

So, I've tried make something like that and it shows me 'parse error' :angry:

Probably, I've missed something, but i just cant understand how IPB use such stuff.... :blink:

Link to comment
Share on other sites

  • 0

heh, we all miss things sometimes..

well, except for me, i'm just the greatest.. but everyone else misses things sometimes ;) ;) :p ;)

Link to comment
Share on other sites

  • 0

I've just found out how to make such stuff :D

&lt;?php
//Here goes our code
//Setting echo
echo &lt;&lt;&lt;EOF
&lt;center&gt;&lt;h1&gt;Blah, blah, blah...&lt;/h1&gt;&lt;/center&gt;
EOF;
//That's all folks :D
?&gt;

Now I can make some interesting stuff ;)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.