Page 1 of 1

Lable single quotes problem

Posted: 2011-10-01T02:23:52-07:00
by agriz
$text = "test"; //works
$text = "this's"; //not working

$string = " -background transparent" . " -font '{$font}'". " -pointsize {$font_size}". " -gravity center label:'".$text."'".$stroking;

How to fix this?

Re: Lable single quotes problem

Posted: 2011-10-17T10:01:09-07:00
by ustas19
It looks like you use imagick from command line.

and you need escape you single quote with \

try $text = "this\'s";

or you can use addcslashes or similar function.

Re: Lable single quotes problem

Posted: 2011-10-17T10:32:18-07:00
by agriz
Thanks!