Larry Vollmer
asked on
PHP syntax
I am having a syntax issue that I cannot figure out. Here is the code being executed:
Here is the output. As you can see, the img tag is not closing and the HTML that is supposed to be echoed is included in the img reference.
<a href="http://www.google.com"><img src="/img/blog_widget/img.png This is my html" alt="alt text here" target="_blank" /></a>
Any idea why this is happening?
<?= $this->Html->link(
$this->Html->image(
$this->Html->url('/img/blog_widget/img.png' . " " . __("This is my html", true)),
array(
'alt' => __("alt text here", true),
'target' => '_blank'
)
),
$this->Html->url(
'http://www.google.com'
),
array('escape' => false)
);?>
Here is the output. As you can see, the img tag is not closing and the HTML that is supposed to be echoed is included in the img reference.
<a href="http://www.google.com"><img src="/img/blog_widget/img.png This is my html" alt="alt text here" target="_blank" /></a>
Any idea why this is happening?
ASKER
Thanks - that spits out > instead of the closing bracket.
It's cake 1.2. I will try to find a link.
It's cake 1.2. I will try to find a link.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes! Thank you.
Or maybe just change line 3 to this:
$this->Html->url('/img/blo