Hi all
First time here and I'm just learning PHP...
I am making a generator using imagemagick and I'm trying to use strlen. When a user enters their name, I want it to use a smaller font size if it's over a certain amount of characters and vice versa...
I can't seem to get what I'm doing wrong.
Here is my code
$name = $_POST['name'];
if(strlen($name) < 10) { $fontsize = '55px'; }
if(strlen($name) > 10) { $fontsize = '50px'; }
Here is my imagemagick code:
exec("".$pathIM."convert -quality ".$quality." -font pealindseyunicase.ttf -pointsize ".$fontsize." -fill deepskyblue -draw \"text 70,70 '".$_POST['name']."'\" $finalimage $finalimage");
I've tried it without the -pointsize, with and without " and '
Not sure what I'm doing wrong...
Any help and idea?
Thanks so much