hi ive got a html table echoing through php and im having problems displaying image in the table heres what i have so far

if($fetch_image['user_image']!='') {
echo '<td>'.$fetch_image['user_image'].'</td>';
 } else {
echo '<td>'.<img  src='images/blank_big.jpg' height='150px;' width='150px;' />.'</td>';
 }

and here is the fetch section

$user_image = mysqli_query($conn,"select * from user_images where user_id = '".$fetch_user['user_id']."' and main_image = '1' ");
$fetch_image    = mysqli_fetch_array($user_image);

and here is the error i am getting
PHP Parse error: syntax error, unexpected '<' in

any help on this would be much appreciated ty jan x

It's line 4:

echo '<td>'.<img  src='images/blank_big.jpg' height='150px;' width='150px;' />.'</td>';

The way you are using the concatenation operator (dot operator) is not correct, as <img ... is a string, so it must be quoted. Do:

echo "<td><img src='images/blank_big.jpg' height='150px' width='150px' /></td>";

Bye!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.