Reputation: 171
I am getting an unexpected T string parse error, I don't know how to incorporate php into this itemprop, can anyone help
$str_policy_details .= '<img itemprop="image" src="data:image/jpeg;base64,<?php echo base64_encode($broker_details->BrokerImage); ?>"/>';
Upvotes: 0
Views: 21
Reputation: 167192
You are using <?php
when you are already inside PHP, which causes the issue. Please change your code to:
$str_policy_details .= '<img itemprop="image" src="data:image/jpeg;base64,' . base64_encode($broker_details->BrokerImage) . '"/>';
//-------------------------------------------------------------------------^^^-------------------------------------------^^^^
Upvotes: 2