0

I try to add this line to my PHP code:

<a href="#" onClick="window.open('yourpage.htm','pagename','resizable,height=640,width=360'); return false;">New Page</a>

PHP:

$html_table .= "<td> <a href="#" onClick="window.open('mypage.htm','pagename','resizable,height=640,width=360'); return false;"><button type='button' class='btn btn-success'>test</button></a></td>";

But its dont work with " inside.

Whats the best way to change my Code?

Thanks

1 Answers1

1

You need to escape quotes:

<?php

$html_table .= "<td> <a href=\"#\" onClick=\"window.open('mypage.htm','pagename','resizable,height=640,width=360'); return false;\"><button type='button' class='btn btn-success'>test</button></a></td>";