Jump to content

How to write this echo statment


cmb

Recommended Posts

i don't know how to write this

<a href='#' onclick="toggle_visibility('login');" style='color:white'>Login</a>

inside and echo so it works right because for the onclick to work right it has to be in double quote's and not single so this doesn't work

<?php
echo "<a href='#' onclick='toggle_visibility('login');' style='color:white'>Login</a>";
?>

Link to comment
https://forums.phpfreaks.com/topic/265652-how-to-write-this-echo-statment/
Share on other sites

i don't know how to write this

<a href='#' onclick="toggle_visibility('login');" style='color:white'>Login</a>

inside and echo so it works right because for the onclick to work right it has to be in double quote's and not single so this doesn't work

<?php
echo "<a href='#' onclick='toggle_visibility(\"login\");' style='color:white'>Login</a>";
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.