2

I want to place this code:

<?php echo Sabai::_h($entity->getAuthor()->email);?>

inside of this code:

<?php echo get_avatar( '[email protected]', 32 ); ?>

where it says [email protected]. Can someone write this so I can understand?

2 Answers 2

6

Try this:

<?php echo get_avatar( Sabai::_h($entity->getAuthor()->email), 32 ); ?>

Or:

$email = Sabai::_h($entity->getAuthor()->email);
<?php echo get_avatar( $email, 32 ); ?>
Sign up to request clarification or add additional context in comments.

2 Comments

The first code simply places the email on top of a no picture avatar
Then maybe there is something wrong with the get_avatar function. Could you share more details about your code?
0

Try out in this way. as ocanal said. PHP echo inside echo taken from his example

     echo '<td align="left"><a href="'.url('Forum/create_new_post?topic_id='.$post->topic_id.'&forum_id='.$post->forum_id.'').'"><img src="'.SITE_URL.'/lib/skins/flyeuro/images/forums/t_reply.gif"/></a></td>';

or you can also refer this link for your reference. How to write php echo inside echo

please modify according to your code.

1 Comment

im not sure how, im new at this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.