|
Posted by bill on 12/20/06 11:51
bill wrote:
> Thanks to those that taught me to use heredoc to embed html in php. I
> don't want to start the html in php vs php in html discussion again.,
>
> heredoc works a treat for that which I am doing except:
> In the generated html I have a number of checkboxes. I fill in the
> checkboxes from a boolean value in a mySQL table. To make this easier I
> use a function that takes the boolean and return either 'checked' or
> ''. This worked well when I was concatenating the html into a variable
> rather than using heredoc, but it was really messy.
>
> Short, simple question: is there anyway to get php to evaluate a
> function while in a heredoc block ?
>
> I know I could assign the results of using the function to variables
> outside of the heredoc block or I could break the block for the
> function, but the first is cumbersome and the second gets rid of the
> clarity of the heredoc approach.
>
> bill
Thanks all, I was afraid there was not a simple way to do this.
bill
Navigation:
[Reply to this message]
|