Workshop

The workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1:What RGB values would you use for pure black and pure white?
2:How do you create a new, blank canvas that is 300 pixels wide and 200 pixels tall?
3:What function is used to draw a polygon? A filled polygon?

Answers

A1: (0,0,0) and (255,255,255)
A2: $new_image = ImageCreate(300,200);
A3: ImagePolygon() and ImageFilledPolygon()

Activity

Q1:Instead of creating a pie chart, use your drawing skills to create a bar chart with either vertical or horizontal bars, each 30 pixels wide and filled with the same color, but of different lengths. Ensure that there are 10 pixels of space between ...

Get Sams Teach Yourself PHP, MySQL® and Apache All in One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.