Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ph_img($width, $height = NULL) {
- $url = 'http://placehold.it/';
- if($height == NULL) {
- return $url . $width;
- }
- return $url . $width . 'X' . $height;
- }
- /*
- PLACEHOLDER USAGE:
- <img src="<?=ph_img(250);?>"/> //square image 250x250
- <img src="<?=ph_img(250,150);?>"/> //image 250x150
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement