• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

php a varianble no display

<?php if ($mode == "updating") {echo <a href="login.php?id={$plugin_id}">click here</a> ?>

come up result => abc.com/login.php?id=

but work when <?php echo $plugin_id; ?>

this not working when variable inside hyperlink. expert pls help
0
john80988
Asked:
john80988
  • 2
1 Solution
 
käµfm³d 👽Commented:
You need quotes around the string literals you are echoing:

<?php if ($mode == "updating") { echo "<a href=\"login.php?id={$plugin_id}\">click here</a>" } ?>

Open in new window

0
 
john80988Author Commented:
Parse error: syntax error, unexpected '<'
0
 
john80988Author Commented:
yes it work, tq
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now