php inside and if. Is this possible?

why this don't work?

...
if (something) {
echo '<button type="button" title="<?php echo $this->__('foo') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getUrl('goo') ?>')"><span><span><?php echo $this->__('hoo') ?></span></span></button>';
} else
...

Not possible a php query inside an If? I know I don't know nothing about PHP. For me is logical.
 
Back
Top