Im trying to display the html like echo $contentsArray[0]; in php, however the image is not displayed.
since, the img path is displayed like "<?=POST_IMG?>post/item/mypost/post_1.png" instead of
"img/PostImg/post/item/mypost/post_1.png". How should I fix this problem.
define('POST_IMG', 'img/PostImg/');
$item1 = '<a href="#" target="_blank"> <div class="left">
<img src="<?=POST_IMG?>post/item/mypost/post_1.png">
</div></a>';
$contentsArray = array($item1, ...More
<img src="'.POST_IMG.'post/item/mypost/post_1.png">. You just have to concatinate the variable in your string