Tuesday, June 1, 2010

Newbie question: URL linking

In this example:

<?php if (!empty($user['social_media']['linkedin'])):?>
<td valign="bottom" align="center">
<?php echo $html->link($html->image('linkedin.gif', array ('alt' =>
'LinkedIn' , 'align' => 'bottom')), ' ', array(), null, false); ?>
<?php echo $user['social_media']['linkedin']; ?></td>
<?php endif; ?>

I am trying to use a field in my social_media table, entitled
"linkedin," to be the url of my $html->link statement. But if I plug
that php echo line in between the single quotes, I get a parse
error.

How can I retrieve this table field to be the URL in my $html->link
statement?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: