10.04.2014 Views

to get the file

to get the file

to get the file

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Output<br />

• print function:<br />

• Called with only one parameter, possibly in a paren<strong>the</strong>sis<br />

(Ex) print "Welcome <strong>to</strong> my site!";<br />

• Will coerce non-string type value <strong>to</strong> a string<br />

• Return a value (1 if successful, 0 o<strong>the</strong>rwise)<br />

• printf function<br />

• Is like its counterpart in C<br />

• Can control <strong>the</strong> format of displayed data completely<br />

(Ex) $day = “Tuesday”;<br />

$high = 79;<br />

printf (“The high on %7s was %3d”, $day, $high);<br />

28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!