-1

I am getting parse syntax error and not sure how to fix this. I would appreciate any help here

 if(isset($selectedUser))
    {
        echo '<tr>';
        echo '<td>' . $selectedUser['first_name'] . '</td>';
        echo '<td>' . $selectedUser['last_name'] . '</td>';
        echo '<td>' . $selectedUser['email'] . '</td>';
        echo '<td>' . $selectedUser['address_city'] . '</td>'; 
        echo '<td>' . $selectedUser['address_state'] . '</td>'; 
        echo '<td>' . $selectedUser['address_country'] . '</td>'; 
echo '<td>'<a href="https://example.com/Coach.php?id=<?php echo $selectedUser['hashword($id, $salt)'] ?>"><input type="button" value="view"/> </a>'<td>'
        echo '</tr>';
        
    }
jon
  • 15
  • 4
  • You have a bunch of `echo` statements, and then ` – r3mainer Mar 31 '16 at 00:22
  • @squeamishossifrage i tried echoing that line but it is throwing me same error – jon Mar 31 '16 at 00:23
  • @jon Just look at the syntax highlighting and you already see the error. You know how to concatenate values, why do you do something different for the penultimate line?! – Rizier123 Mar 31 '16 at 00:24

1 Answers1

0

Change

echo '<td>' . $selectedUser['address_country'] . '</td>'; 
<td><a href="https://example.com/Coach.php?id=<?php echo $selectedUser['hashword($id, $salt)'] ?>"><input type="button" value="view"/> </a><td>
echo '</tr>';

and add a ?> and <?php.

echo '<td>' . $selectedUser['address_country'] . '</td>'; 
?>
<td><a href="https://example.com/Coach.php?id=<?php echo $selectedUser['hashword($id, $salt)'] ?>"><input type="button" value="view"/> </a><td>
<?php
echo '</tr>';
Federkun
  • 36,084
  • 8
  • 78
  • 90