Having a custom xml from youtube channel - php

I want to show say last 5 videos that I have uploaded in my youtube channel in a block in my site. I currently have this url that produces a xml file.
I dont know where should I go in youtube to customize this xml file lets say I only want it return only the last 5 videos.
Alos, it returns in entry tags some sort of html formatted stuff for the description I had written in youtube for the uploaded file. for example for one of my videos it shows like this:
<div style="color: #000000;font-family: Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; width: 555px;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="140" valign="top" rowspan="2"><div style="border: 1px solid #999999; margin: 0px 10px 5px 0px;"><img alt="" src="http://i.ytimg.com/vi/Ihy785MpH7g/0.jpg"></div></td>
<td width="256" valign="top"><div style="font-size: 12px; font-weight: bold;"><a style="font-size: 15px; font-weight: bold; font-decoration: none;" href="http://www.youtube.com/watch?v=Ihy785MpH7g&feature=youtube_gdata">TinyOS Tutorial #3 - Quick overview and HelloWorld application!</a>
<br></div>
<div style="font-size: 12px; margin: 3px 0px;"><span>Topics:
-Quick overview of TinyOS
-Application Structure in TinyOS
-Simple HelloWorld application
-Extending HelloWorld applications with timers</span></div></td>
<td style="font-size: 11px; line-height: 1.4em; padding-left: 20px; padding-top: 1px;" width="146" valign="top"><div><span style="color: #666666; font-size: 11px;">From:</span>
ElectronicsPubVideos</div>
<div><span style="color: #666666; font-size: 11px;">Views:</span>
37</div>
<div style="white-space: nowrap;text-align: left"><img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"></div>
<div style="font-size: 11px;">1
<span style="color: #666666; font-size: 11px;">ratings</span></div></td></tr>
<tr><td><span style="color: #666666; font-size: 11px;">Time:</span>
<span style="color: #000000; font-size: 11px; font-weight: bold;">42:52</span></td>
<td style="font-size: 11px; padding-left: 20px;"><span style="color: #666666; font-size: 11px;">More in</span>
Science & Technology</td></tr></tbody></table></div>
What I need is just few things: Title, link, screenshot of the video(That I have selected in youtube itself) and raw description text. So that I can put them nicely in my website with my own style.

This works for me
$string = file_get_contents('https://gdata.youtube.com/feeds/api/users/USER_NAME/uploads?v=2&alt=json&max-results=5&orderby=published');
if($result = json_decode($string, true)) {
foreach($result['feed']['entry'] as $entry) {
echo "Title: ".$entry['title']['$t']."<br />";
echo "Description: ".$entry['media$group']['media$description']['$t']."<br />";
echo "Published: ".$entry['published']['$t']."<br />";
echo "Link: ".$entry['link'][0]["href"]."<br />";
echo "Thumb: ".$entry['media$group']['media$thumbnail'][0]['url']."<br />";
echo "<hr />";
}
} else{
echo "<h1>Problem with service</h1><br />";
echo $output;
}
Hope that helps.

Related

How to build HTML element based on MySQL results

Problem
I am constructing an HTML email to send which includes products in our database.
I have all the moving parts, I believe, to complete the task but just not sure how to piece it together.
The HTML template
$template = file_get_contents("notify.html");
Template Tags
{{TITLE}}
{{PRICE}}
{{LOCATION}}
{{MILES}}
The element I want to loop
NOTE: This first element is inside the template. I can remove it if we need to, though.
$div = <<<EOF
<!-- START LOOP HERE -->
<div style="background-color:transparent;">
<div class="block-grid four-up no-stack" style="Margin: 0 auto; min-width: 320px; max-width: 650px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; background-color: #FFFFFF;">
<div style="border-collapse: collapse;display: table;width: 100%;background-color:#FFFFFF;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:transparent;"><tr><td align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:650px"><tr class="layout-full-width" style="background-color:#FFFFFF"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="162" style="background-color:#FFFFFF;width:162px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:5px; padding-bottom:5px;"><![endif]-->
<div class="col num3" style="max-width: 320px; min-width: 162px; display: table-cell; vertical-align: top; width: 162px;">
<div style="width:100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div style="border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:0px solid transparent; padding-top:5px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;">
<!--<![endif]-->
<div align="center" class="img-container center fixedwidth" style="padding-right: 0px;padding-left: 0px;">
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr style="line-height:0px"><td style="padding-right: 0px;padding-left: 0px;" align="center"><![endif]--><img align="center" alt="Image" border="0" class="center fixedwidth" src="images/2.png" style="text-decoration: none; -ms-interpolation-mode: bicubic; border: 0; height: auto; width: 100%; max-width: 130px; display: block;" title="Image" width="130"/>
<!--[if mso]></td></tr></table><![endif]-->
</div>
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td><td align="center" width="162" style="background-color:#FFFFFF;width:162px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 1px dotted #E8E8E8;" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:30px; padding-bottom:35px;"><![endif]-->
<div class="col num3" style="max-width: 320px; min-width: 162px; display: table-cell; vertical-align: top; width: 161px;">
<div style="width:100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div style="border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:1px dotted #E8E8E8; padding-top:30px; padding-bottom:35px; padding-right: 0px; padding-left: 0px;">
<!--<![endif]-->
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 0px; padding-top: 10px; padding-bottom: 5px; font-family: Tahoma, Verdana, sans-serif"><![endif]-->
<div style="color:#555555;font-family:Lato, Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:10px;padding-right:10px;padding-bottom:5px;padding-left:0px;">
<div style="font-size: 12px; line-height: 1.2; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #555555; mso-line-height-alt: 14px;">
<p style="font-size: 16px; line-height: 1.2; text-align: left; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; word-break: break-word; mso-line-height-alt: 19px; margin: 0;"><span style="font-size: 16px; color: #2190e3;"><strong>{{TITLE}}</strong></span></p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 0px; padding-top: 0px; padding-bottom: 10px; font-family: Tahoma, Verdana, sans-serif"><![endif]-->
<div style="color:#555555;font-family:Lato, Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:0px;padding-right:10px;padding-bottom:10px;padding-left:0px;">
<div style="font-size: 12px; line-height: 1.2; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #555555; mso-line-height-alt: 14px;">
<p style="font-size: 14px; line-height: 1.2; text-align: left; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; word-break: break-word; mso-line-height-alt: 17px; margin: 0;">{{MILES}}</p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td><td align="center" width="162" style="background-color:#FFFFFF;width:162px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 1px dotted #E8E8E8;" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:55px; padding-bottom:5px;"><![endif]-->
<div class="col num3" style="max-width: 320px; min-width: 162px; display: table-cell; vertical-align: top; width: 161px;">
<div style="width:100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div style="border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:1px dotted #E8E8E8; padding-top:55px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;">
<!--<![endif]-->
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 0px; padding-bottom: 10px; font-family: Tahoma, Verdana, sans-serif"><![endif]-->
<div style="color:#555555;font-family:Lato, Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:0px;padding-right:10px;padding-bottom:10px;padding-left:10px;">
<div style="font-size: 12px; line-height: 1.2; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #555555; mso-line-height-alt: 14px;">
<p style="font-size: 20px; line-height: 1.2; text-align: center; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; word-break: break-word; mso-line-height-alt: 24px; margin: 0;"><span style="font-size: 20px;"><strong>{{LOCATION}}</strong></span></p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<table border="0" cellpadding="0" cellspacing="0" class="divider" role="presentation" style="table-layout: fixed; vertical-align: top; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; min-width: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;" valign="top" width="100%">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td class="divider_inner" style="word-break: break-word; vertical-align: top; min-width: 100%; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;" valign="top"><table align="center" border="0" cellpadding="0" cellspacing="0" class="divider_content" height="30" role="presentation" style="table-layout: fixed; vertical-align: top; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-top: 0px solid transparent; height: 30px; width: 100%;" valign="top" width="100%">
<tbody>
<tr style="vertical-align: top;" valign="top">
<td height="30" style="word-break: break-word; vertical-align: top; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;" valign="top"><span></span></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td><td align="center" width="162" style="background-color:#FFFFFF;width:162px; border-top: 0px solid transparent; border-left: 0px solid transparent; border-bottom: 0px solid transparent; border-right: 0px solid transparent;" valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 0px; padding-left: 0px; padding-top:55px; padding-bottom:5px;"><![endif]-->
<div class="col num3" style="max-width: 320px; min-width: 162px; display: table-cell; vertical-align: top; width: 162px;">
<div style="width:100% !important;">
<!--[if (!mso)&(!IE)]><!-->
<div style="border-top:0px solid transparent; border-left:0px solid transparent; border-bottom:0px solid transparent; border-right:0px solid transparent; padding-top:55px; padding-bottom:5px; padding-right: 0px; padding-left: 0px;">
<!--<![endif]-->
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 15px; padding-left: 0px; padding-top: 0px; padding-bottom: 0px; font-family: Tahoma, Verdana, sans-serif"><![endif]-->
<div style="color:#555555;font-family:Lato, Tahoma, Verdana, Segoe, sans-serif;line-height:1.2;padding-top:0px;padding-right:15px;padding-bottom:0px;padding-left:0px;">
<div style="line-height: 1.2; font-size: 12px; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; color: #555555; mso-line-height-alt: 14px;">
<p style="line-height: 1.2; text-align: center; font-size: 20px; font-family: Lato, Tahoma, Verdana, Segoe, sans-serif; word-break: break-word; mso-line-height-alt: 24px; margin: 0;"><span style="font-size: 20px;"><span style="font-size: 20px;"><strong>{{PRICE}}</strong></span></span></p>
</div>
</div>
<!--[if mso]></td></tr></table><![endif]-->
<!--[if (!mso)&(!IE)]><!-->
</div>
<!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
<!--[if (mso)|(IE)]></td></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
EOF;
A Simple template system
But I believe this will work on only one row (right?)
foreach($variables as $key => $value)
{
$template = str_replace('{{ '.$key.' }}', $value, $template);
}
MySQL Results
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT * from";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
// $row['title']
// $row['price']
// $row['location']
// $row['miles']
}
} else {
echo "0 results";
}
So...
Given all that, how would I construct the HTML to loop over the results and include that DIV as many times as there are results?
Thank you for looking.
Ps. I did research this topic on SO , and found similar questions but none quite matched my criteria. Thanks again!
I believe something like that would work:
<?php
$template = file_get_contents("notify.html");
$html = "";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT * from PRODUCT";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0)
{
// Add template into HTML with replaced variable for each row
while($row = mysqli_fetch_assoc($result))
{
$tmp_template = $template;
foreach($row as $key => $value)
{
$tmp_template = str_replace('{{ '.$key.' }}', $value, $template);
}
$html .= $tmp_template;
}
echo $html;
}
else
{
echo "0 results";
}
The only thing I added is the tmp_template variable. This variable is a copy of the original template where you will replace the variable from your query into it. After replacing all the variable with their value, you will at this tmp_template variable into a html variable. This html variable will be your final result that you will send by email. You could add a header before the loop and a footer after the loop into your html variable for the email.
PLEASE NOTE: I did not test this code, but it should be very close to what you need.

how do i insert php variable in html mail file

i have a php file to generate otp and sending html mail to user but i am unable to insert php variable it beacuse i am getting html mail content from other file please help me to do it
i want to insert below variable in html
$otpemail
$name
here is my php code
if (isset($_POST['resend'])) {
$uid = $_SESSION['usr_id'];
$otpemail=mt_rand(100000,999999);
$subject = "Email verification";
$email_from= "Go Alert <verification#goalert.in>";
$email_reply = "feedback#goalert.in";
$headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_reply."\r\n" .'X-Mailer: PHP/' . phpversion();
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$user =$db->getemail($uid);
if($user != NULL){
$email = $user['email'];
$name = $user['name'];
$status = "Not Verified";
$messageemail = file_get_contents('email.html');
$user=$db->resendemailotp($uid,$name,$email,$otpemail,$status);
#mail($email, $subject, $messageemail, $headers);
$errormsg1 = "Email Sent Please Check Spam if not recived";
}else {
$errormsg1 = "Error in Sending Email";
}
}
my html mail file codes are
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" style="background: #f0f0f0; min-height: 100%;" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width" name="viewport" />
</head>
<body style="box-sizing: border-box; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; min-width: 100%; padding: 0; text-align: left; width: 100% !important;">
<table class="body" style="background: #f0f0f0; border-collapse: collapse; border-spacing: 0; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; height: 100%; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td align="center" class="center" style="border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;" valign="top">
<center data-parsed="" style="min-width: 580px; width: 100%;">
<table class="container text-center" style="background: #fefefe; border-collapse: collapse; border-spacing: 0; margin: 0 auto; padding: 0; text-align: center; vertical-align: top; width: 580px;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td style="border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
<!-- This container adds the gap at the top of the email -->
<table class="row grey" style="background: #f0f0f0; border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">   </th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table class="container text-center" style="background: #fefefe; border-collapse: collapse; border-spacing: 0; margin: 0 auto; padding: 0; text-align: center; vertical-align: top; width: 580px;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td style="border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
<!-- Main email content -->
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!-- Logo -->
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<center data-parsed="" style="min-width: 532px; width: 100%;"><a align="center" class="text-center" href="http://www.goalert.in" style="color: #f7931d; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;"> <img alt="Logo Image" class="swu-logo" src="https://www.goalert.in/test/assets/images/logo.png" style="border: none; clear: both; display: block; height: auto; max-width: 100%; outline: none; padding: 15px 0px 0px 0px; text-decoration: none; width: 170px;" /> </a></center>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row masthead" style="background: #212121; border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!-- Masthead -->
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<h1 class="text-center" style="color: #f7931d; font-family: Helvetica, Arial, sans-serif; font-size: 34px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 10px; padding: 35px 0px 15px 0px; text-align: center; word-wrap: normal;">Download our Application</h1>
<center data-parsed="" style="min-width: 532px; width: 100%;"><a align="center" class="text-center" href="https://play.google.com/store/apps/details?id=in.com.goalert" style="color: #f7931d; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;"> <img align="center" alt="Masthead Image" class="text-center" src="https://www.goalert.in/test/assets/images/play.png" style="border: none; clear: both; display: block; float: none; margin: 0 auto; max-width: 100%; outline: none; text-align: center; text-decoration: none; width: auto;" valign="bottom" /> </a></center>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">   <!--This container adds the gap between masthead and digest content -->
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!-- Email copy -->
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<h5 style="color: inherit; font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 10px; padding: 0; text-align: left; word-wrap: normal;">Hi, {{name}}</h5>
<p style="color: #777777 !important; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; margin-bottom: 10px; padding: 0; text-align: left;">Thankyou for suscribing with Go Alert.Now receive all application notifiaction into your mailbox.For faster information download our official mobile application from here</p>
<br />
<hr style="border-bottom: 1px solid #cacaca; border-left: 0; border-right: 0; border-top: 0; clear: both; height: 0; margin: 20px auto; max-width: 580px;" />
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<h5 class="text-center" style="color: inherit; font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 10px; padding: 0; text-align: center; word-wrap: normal;">Your OTP is</h5>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!-- Coupon code box -->
<th class="small-12 large-4 columns first" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 8px; text-align: left; width: 177.33333px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
</th>
</tr>
</table>
</th>
<th class="grey small-12 large-12 columns" style="background: #f0f0f0; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 8px; padding-right: 8px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<br />
<h5 class="text-center" style="color: inherit; font-family: Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.3; margin: 0; margin-bottom: 10px; padding: 0; text-align: center; word-wrap: normal;" valign="middle">2ob3-32cc39-2pe3-291ab</h5>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
<th class="small-12 large-4 columns last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 8px; padding-right: 16px; text-align: left; width: 177.33333px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!-- Call to Action -->
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<center data-parsed="" style="min-width: 532px; width: 100%;">
<br align="center" class="text-center" />
<br align="center" class="text-center" />
<table class="button text-center" style="border-collapse: collapse; border-spacing: 0; margin: 0 0 16px 0; padding: 0; text-align: center; vertical-align: top; width: auto !important;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td style="border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td style="background: #f7931d; border: 2px solid #f7931d; border-collapse: collapse !important; color: #fefefe; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; width: auto !important; word-wrap: break-word;">Download Our Application </td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
<table class="row" style="border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<!--This row adds the gap between masthead and digest content -->
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">   </th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- / End main email content -->
<table class="container text-center" style="background: #fefefe; border-collapse: collapse; border-spacing: 0; margin: 0 auto; padding: 0; text-align: center; vertical-align: top; width: 580px;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<td style="border-collapse: collapse !important; color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 19px; margin: 0; padding: 0; text-align: left; vertical-align: top; word-wrap: break-word;">
<table class="row grey" style="background: #f0f0f0; border-collapse: collapse; border-spacing: 0; display: table; padding: 0; position: relative; text-align: left; vertical-align: top; width: 100%;">
<tbody>
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th class="small-12 large-12 columns first last" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0 auto; padding: 0; padding-bottom: 16px; padding-left: 16px; padding-right: 16px; text-align: left; width: 564px;">
<table style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top; width: 100%;">
<tr style="padding: 0; text-align: left; vertical-align: top;">
<th style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0; text-align: left;">
<p class="text-center footercopy" style="color: #777777 !important; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: normal; line-height: 19px; margin: 0; margin-bottom: 10px; padding: 20px 0px; text-align: center;">© Copyright 2016 Go Alert. All Rights Reserved.</p>
</th>
<th class="expander" style="color: #0a0a0a; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 19px; margin: 0; padding: 0 !important; text-align: left; visibility: hidden; width: 0;">
</th>
</tr>
</table>
</th>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</td>
</tr>
</table>
</body>
</html>
Quick/dirty, use the output buffering system:
foo.html
<div><?php echo $var ?></div>
main script:
ob_start();
$var = 'hi mom!';
include('foo.html'); // executes any php code in the file
$html = ob_end_clean();
Alternatively, you could use a simple templating system:
foo.html:
<div>%VAR%</div>
main script:
$raw_html = file_get_contents('foo.html');
$var = 'hi mom!';
$complete_html = str_replace('%VAR%', $var, $raw_html);

Codeigniter Dompdf can't remove the black footer.

I am using dompdf in codeigniter, the HTML page looks fine but in dompdf generated pdf, there is a black box.
The code in the footer section is:
<div class="signature-footer">
<table>
<tr>
<td style="text-align: center;border-style:dashed; border-top:1px black;border-bottom:1px solid white; border-left:1px solid white; border-right:1px solid white;">Prepared By<br><?php echo $quotation_detail[0]->employee_name; ?><br><?php echo $quotation_detail[0]->designation_name ; ?></td>
<td style="width: 30%;border-top:1px solid white;border-bottom:1px solid white; border-left:1px solid white; border-right:1px solid white;"> </td>
<td style="text-align: center;border-top:1px solid white;border-bottom:1px solid white; border-left:1px solid white; border-right:1px solid white;"> </td>
<td style="width: 30%;border-top:1px solid white;border-bottom:1px solid white; border-left:1px solid white; border-right:1px solid white;"> </td>
<td style="text-align: center;border-style:dashed; border-top:1px black;border-bottom:1px solid white; border-left:1px solid white; border-right:1px solid white;">Authorized Signature<br> <br> </td>
</tr>
</table>
</div>
</div><div class="below-border-footer"></div><div style="text-align: center"><img src="<?php echo base_url(); ?>interface/img/footerImage.png"> </div></div></body>
</html>
CSS for these two elements:
.below-border-footer {
width: 100%;
border-top: 0 ;
padding-bottom: 0;
text-align: center;
}
.signature-footer {
font-size: 12px;
font-weight: bold;
width: 100%;
position: relative;
margin-top: 70px;
margin-bottom: 2px;
}
I've tried for hours but no result. How can I remove the black box in the footer?

How to insert foreach after echo?

this might be a stupid question so please accept my apologies.
I have written a code snippet for a wordpress website that lists restaurants. You enter the instagram id of the venues (if they have one) and it shows the latest instagram photos they've uploaded. If the instagram id value is left empty, i want it to echo nothing. I've written the code and it works fine for places with instagram id's, but as I'm unable the last piece of code (that starts with foreach) inside the echo section, it tries to show it even when the id is empty hence i get a "Invalid argument supplied for foreach() in" error. Can you help me out so that I can include that code inside the echo part, so that it won't call that code when id is empty? Thanks very much in advance.
<?php
if ( $instagramid ) {
echo "
<br><br>
<span style=\"float:left; -webkit-border-radius: 3px;
border-radius: 3px;
font-size: 14px;
float: left;
line-height: 32px;
margin-right: 5px;
margin-top:12px;
padding: 0px 3px 0px 5px;
\">
<a target=\"_blank\" href=\"http://instagram.com/".$username."\"><img width=\"80\" border=\"1px\" src=\"".$profilepic."\"></a></span>
<br>
<div style=\"margin-left: 50px;\">
<div style=\"position: relative;
float: left;
left: 0.00%;
width: 75.00%;
background-color: #f4f4f4\">
<span style=\"
font-weight: bold;
font-style: normal;
font-size: 12px; letter-spacing: 0px; padding: 0px 0px 0px 0px; \"><a style=\"color: #3f729b; font-weight: bold; \" target=\"_blank\" href=\"http://instagram.com/".$username."\">".$username."</a> # instagram</span>
</div>
<div style=\"position: relative;
float: left;
left: 0.00%;
width: 82.00%;\">
<div style=\"position: relative;
float: left;
left: 0.50%;
width: 33.00%;\">
<span style=\"
font-weight: lighter;
font-style: normal;
font-size: 11px; letter-spacing: 0px; padding: 0px 0px 0px 0px; \">Photos<br>
<span style=\"
font-weight: bold; \"><span style=\"
letter-spacing: 0px;\">".$sayi."</span></span></span>
</div>
<div style=\"position: relative;
float: left;
left: 1.50%;
width: 33.00%;\">
<span style=\"
font-weight: lighter;
font-style: normal;
font-size: 11px; letter-spacing: 0px; padding: 0px 0px 0px 0px; \">Followers<br>
<span style=\"
font-weight: bold;\"><span style=\"
letter-spacing: 0px;\">".$takipci."</span></span></b></span>
</div>
<div style=\"position: relative;
float: right;
right: 0.50%;
width: 31.00%;\">
<span style=\"
font-weight: lighter;
font-style: normal;
font-size: 11px; letter-spacing: 0px; padding: 0px 0px 0px 0px; \">Following<br><span style=\"
font-weight: bold;\"><span style=\"
letter-spacing: 0px;\">".$takipediyor."</span></span></span>
</div>
</div>
</div>
<br><br>
";
}
else {
echo "";
}
?>
<?php foreach ($result->data as $fotos): ?>
<!-- Renders images. #Options (thumbnail,low_resoulution, high_resolution) -->
<span style="font-size: 12px; float:left;
margin:5px 0 2px 10px;">
<a target="_blank" class="group" rel="group1" href="<?= $fotos->link ?>">
<img width="90" src="<?= $fotos->images->thumbnail->url ?>"></a>
<span style="font-weight:bold; float:left;"></span>
<span style="float:right;"><span style="color:red; font-weight: bolder;">❤ </span><?= $fotos->likes->count ?></span>
</span><?php endforeach //Biter ?>
Maybe like someone said you need to put your loop in if statment like this
<?php
if ( $instagramid ) {
// Your old code is here "your echo"
// but before end of if statment, and after echo"" put loop
foreach ($result->data as $fotos){ ?>
<!-- Renders images. #Options (thumbnail,low_resoulution, high_resolution) -->
<span style="font-size: 12px; float:left; margin:5px 0 2px 10px;">
<a target="_blank" class="group" rel="group1" href="<?= $fotos->link ?>">
<img width="90" src="<?= $fotos->images->thumbnail->url ?>"></a>
<span style="font-weight:bold; float:left;"></span>
<span style="float:right;"><span style="color:red; font-weight:bolder;">❤ </span><?= $fotos->likes->count ?></span>
</span><?php } //Biter ?>
}
else {
echo "";
}
?>

My comment are running out of comment box

In my web i allow user to post comment with there name and picture. I have notice one issue that when some one post bigger picture in comment using html code it run out of comment box. so all i want is thing should stay inside a comment box. not matter how big picture they post. i have posted all detail below kindly help thanks :|
My html
<div class="mycomment">
<div id="postpic">
<img id="profile_pic" width="50px" height="150px" src="image/user/1.gif" class="">
</div>
<div class="mycommentpost">
<a class="postername" href="profile.php?userID=1">Deepak Kumar: </a><br>
<img src="http://i00.i.aliimg.com/wsphoto/v0/789295022/-font-b-Easter-b-font-day-font-b-Bunny-b-font-ears.jpg" width="650" height="350" alt="">
</div>
</div>
My css:
.mycomment {
font-weight: normal;
color: #000000;
border: 2px solid #DEDEDE;
letter-spacing: 1pt;
font-family: arial, helvetica, sans-serif;
float: left;
width: 550px;
margin: 20px 0;
}
#postpic {
float: left;
width: 70px;
}
.mycommentpost {
font-weight: normal;
color: #000000;
letter-spacing: 1pt;
width: 480px;
float: right;
}
.postername {
color: #580000;
font-weight: bold;
font-size: 1em;
text-decoration: none;
}
Comment here is just a picture:
<img src="http://i00.i.aliimg.com/wsphoto/v0/789295022/-font-b-Easter-b-font-day-font-b-Bunny-b-font-ears.jpg" width="650" height="350" alt="">
Solved : By adding this ->
.mycommentpost > img{
max-height: XXXpx !important;
max-width: XXXpx !important;
}
Add to your CSS
.mycommentpost > img{
max-height: XXXpx !important;
max-width: XXXpx !important;
}
This way you will limit the max sizes of added images..
no matter what size of image they upload using this css set the image to default size in your mycommentpost div.
> .mycommentpost img{
> border: 1px solid #DEDEDE;
> padding: 10px;
> width: 130px; }
Try this
<div class="mycomment">
<div id="postpic">
<img id="profile_pic" width="50px" height="150px" src="image/user/1.gif" class="">
</div>
<div class="mycommentpost">
<a class="postername" href="profile.php?userID=1">Deepak Kumar: </a><br>
<img src="http://i00.i.aliimg.com/wsphoto/v0/789295022/-font-b-Easter-b-font-day-font-b-Bunny-b-font-ears.jpg" width="650" height="350" alt="">
</div>
.mycommentpost {
font-weight: normal;
color: #000000;
letter-spacing: 1pt;
width: 480px;
float: left;
}
.mycommentpost img{
width :450px;
}

Categories