|
Posted by BuZZard on 01/10/07 23:35
"Onideus Mad Hatter" <usenet@backwater-productions.net> wrote in message
news:6p19q215v0cscqtfd2vhnq95e6om6oe4d6@4ax.com...
> On Tue, 09 Jan 2007 21:06:37 -0800, Onideus Mad Hatter
> <usenet@backwater-productions.net> wrote:
>
> >On Tue, 9 Jan 2007 20:06:46 -0500, "Norman Peelman"
> ><npeelman@cfl.rr.com> wrote:
> >
> >>You can create and use variable array variables easily like so:
> >>
> >>
> >>${"line_$i"}[$pos] = "some text";
> >>
> >>and to make multi-dimensional, just:
> >>
> >>${"line_$i"}[$pos] = array('one' => array(), 'two' => array());
> >>
> >>and more:
> >>
> >>${"line_$i"}[$pos]['one'][0] = array();
> >>
> >>etc.
> >>
> >>Norm
> >
> >Hrmmm, dunno work. Is that only with the newest version of PHP or
> >something? Here's the exact code snippet if it helps:
> >
> >:if (isset($HTTP_POST_VARS['image_line_1']))
> >:{
> >: header("Content-type: image/png");
> >: $im = imagecreatetruecolor(128, 192);
> >: $b = 1;
> >:
> >: while($b <= 192)
> >: {
> >: $k = 0;
> >: ${"line_$b"} = explode("|", $_POST['${"image_line_$b"}']);
> >: while($k <= 128)
> >: {
> >: $rgb = explode(",", ${"line_$b"}[$k]);
> >: $color = imagecolorallocate($im, $rgb[0], $rgb[1], $rgb[2]);
> >: imagesetpixel($im,$k+1,$b,$color);
> >: $k++;
> >: }
> >: $b++
> >: }
> >:
> >: imagePNG($im);
> >: imagedestroy($im);
> >:}
> >
> >I tried to you the method you sent me via email and it says:
> >Parse error: syntax error, unexpected '}' on line 25
> >(in my example on line 19)
> >
> >*shrugs*
> >
> >I'm running with ver 4.4.4 of PHP if that makes a difference. I've
> >thought about upgrading but I didn't really wanna have to run through
> >all my existing PHP st00f and make sure it all still works (cause
> >apparently the whole concept of "backwards compatibility" is too just
> >too fucking complicated for The PHP Group to grasp).
>
> Er, never mind, it works. Forgot a freakin semicolon after the $b++
>
> *sigh*
>
> I prefer graphic design to programming any day.
"Paint" doesnt really qualify you as a graphic designer dipshit.
[Back to original message]
|