The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

inserting php function in HTML code prob.

I have a class BasicPageView.php whitch adds header to page.And one of my functions for adding the css.
The problem is that I can't put that function(not even echo() ) into html code, that is to be parsed.

It's same piece of code as previous, just instead include('menu.php') is now used echo("this is not working"). Just to show u where my problem is.I just want to put some function or php code on that place.
I hope it's clearer where I'm stuck?

You don't need or want an echo statement there. You want to either put the words directly or a function that returns a string...

You're assigning a string to the variable $vsebina. You assign it some text, then try to concatenate the echo() function which does not return a string, it immediately sends a string to the browser. That's not the effect you want. Neither is including a file, which also does not return a string, but puts the contents of a file into another file.

If menu.php just contains straight HTML, you could fopen() it, read it into a string, and add that string to your variable. If it's more complex, turn it into a function that returns a string, include menu.php at the top of whatever file needs access to that function, and use it that way.

Ok guys, i managed to input the code in the right place.The problem is that i don't know why didn't work in previous way.
What i had to do is that I passed the string value in function ( addPodjetjeHeader('STRING') ), whitch generates HTML.