2

I want to place this code:

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

inside of this code:

<?php echo get_avatar( 'email@example.com', 32 ); ?>

where it says email@example.com. Can someone write this so I can understand?

Rasclatt
  • 12,498
  • 3
  • 25
  • 33
TechTycoon
  • 29
  • 4

2 Answers2

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 ); ?>
Akshay Khetrapal
  • 2,586
  • 5
  • 22
  • 38
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.

Community
  • 1
  • 1
Badal Shah
  • 7,541
  • 2
  • 30
  • 65