Jump to content

Border around php images


ShaolinF

Recommended Posts

Hi guys,

 

I want to put borders around my php made images. Here is the code:

 

<?php

// Change this to the total number of images in the folder
$total = "3";

// Change to the type of files to use eg. .jpg or .gif
$file_type = ".jpg";

// Change to the location of the folder containing the images
$image_folder = "images";

// You do not need to edit below this line

$start = "1";

$random = mt_rand($start, $total);

$image_name = $random . $file_type;

echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";

?>

Link to comment
https://forums.phpfreaks.com/topic/62311-border-around-php-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.