1

I seem to be having this weird issue going on where I can not get my image view to display at all. The form completely ignores it as if it never existed. I have verified the image source url is confirmed. Currently the code looks like the following:

echo "
<html>
<head>
<link rel='stylesheet' type='text/css' href='mycss.css'>
</head>
<header>
</header>
<body>";
foreach ($data as $product) {
    "
    <div class='content'>
    <img src='/images/" . $product->image . ".jpg' alt='' height='262' width='262'>
    <div class='container clearfix'>
    <p>Product: ". $product->product."</p>";
    foreach ($product->size as $index => $value) {
        echo "
        <p> Size: ". $product->size[$index]." Qty: ". $product->qty[$index] ."</p>";
    }
    echo "
        <p>Vendor Sku: ".$product->vendor_sku."</p>
    </div>
    </div>";
}

and I am using the following css:

.clearfix:before,
.clearfix:after {
  content: "";
  display: table;
}

.clearfix:after {
  clear: both;
}

.clearfix {
  zoom: 1; /* ie 6/7 */
}


.content img {
    margin-right: 15px;
    float: left;
}

.second{
    float:right;
}
.res {
height:60px;
background-color:yellow;
border-bottom:1px solid black;
}
img, .text{
vertical-align:top;
margin-right: 15px;
}
.text{
display:inline-block;

}
p, h5{
margin:0;
  padding:0;
}

But I am getting results are shown in the following image: here

1 Answer 1

1

You are missing an echo just after your foreach statement

foreach ($data as $product) {
    echo "
    <div class='content'>
Sign up to request clarification or add additional context in comments.

1 Comment

Omega Face Palm. Been coding for a few years and still making those mistakes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.