I'm wanting to utilise PHP's built-in imagejpeg and imagepng functions.
I have a variable $type which defines the filetype jpeg or png.
I wanted to have one function call. Something like this:
image.$type($image, null, 100);
But that doesn't work. Any ideas?