How to Fix php Array to string converions

I am using a 2008 php program to take an image, annotate it and create a thumbnail of the image.

The program works but throws a notice of an Array to String conversion.

The relevant code is:

 $ttfont = 'Arial.TTF';
if ($ttfont != '') {
   # using ttf fonts
   $alpha   = range("a", "z");
   $alpha_u = range("A", "Z");
   $alpha = $alpha.$alpha_u.range(0, 9);
   $_b = imageTTFBbox($fontsize,0,$ttfont,$alpha);
   $fontheight = abs($_b[7]-$_b[1]);
} else {

The error is in the $alpha = $alpha.$alpha_u.range(0, 9); line.

The print_rs are my debugging attempts.

I hate having any notices or warnings in my code and would sure appreciate any suggestions for a fix.


1 answer