Reputation: 31
I am wanting to pull a name from a database using php and place it in a link. For example:
echo" -td- -a href ='**$EmployeeID**.jpg'>View Form /a-";
$EmployeeID
being the name of the file i am wanting to place in the link. My issues is adding the file extension (.jpg) on the end of it. Is this possible?
Upvotes: 2
Views: 30
Reputation: 1256
If $EmployeeID
is the name of the file, you can add .jpg at the end of it thanks to this line:
$EmployeeId = $EmployeeID.'.jpg';
So after your edit, your echo will be:
echo ' -td- -a href ="'.$EmployeeID.'.jpg">View Form /a-';
Upvotes: 1