• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • 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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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