modifications in php making SimpleImage I want to make some adjustments on a code Work code is a compilation of images with text in a single image
// making SimpleImage instances of selected friends including main image
$img = new abeautifulsite\SimpleImage('main.jpg');
$img1 = new abeautifulsite\SimpleImage('main2.jpg');
$img2 = new abeautifulsite\SimpleImage('main3.jpg');
$img3 = new abeautifulsite\SimpleImage('main4.jpg');
$img4 = new abeautifulsite\SimpleImage('https://graph.facebook.com/1020534352325130/picture');
$img1->resize(150, 150);
$img2->resize(150, 150);
$img3->resize(150, 150);
$img4->resize(50, 50);
$img->overlay($img1, 'bottom left', 1, 30, -25);
$img->overlay($img2, 'bottom', 1, 0, -25);
$img->overlay($img3, 'bottom right', 1, -30, -25);
$img->overlay($img4, 'top', 1, 0, 25);
$img->text('message', 'fb.OTF', 18, '#FFFFFF', 'top', 0, 20);
$img->save('./dir/' . $_SESSION['gameid2'] . '.jpg');
modifications in php making SimpleImage I want to make line changes the message but added this happened Server Error 500
$img->text('<?php echo $user['name']; ?>', 'fb.OTF', 18, '#FFFFFF', 'top', 0, 20);
I also recall the image using a variable as but an error occurred
$img4 = new abeautifulsite\SimpleImage('https://graph.facebook.com/<?php echo $user['id']; ?>/picture');
This code works well when it is used so
<img src="https://graph.facebook.com/<?php echo $user['id']; ?>/picture" />
<?php echo $user['name']; ?>
Please help Good-bye