将target =“_ blank”插入链接。

I would like to insert a target_blank into this button but I don't know how.

I tried inserting it into the href brackets but it came out with errors and my knowledge of php is very low.

Much appreciated if anyone could help me out here. (I would like to insert it in the 'orginal form' part rather than the 'pop up form').

<?php
                    $pricing = $subscription->get_pricingarray();

                    if($pricing) {
                        ?>
                        <span class='link'>
                            <?php

                                if(isset($M_options['formtype']) && $M_options['formtype'] == 'new') {
                                    // pop up form
                                    $link = admin_url( 'admin-ajax.php' );
                                    $link .= '?action=buynow&amp;subscription=' . (int) $sub->id;
                                    $class = 'popover';
                                } else {
                                    // original form
                                    $link = '?action=registeruser&amp;subscription=' . (int) $sub->id;


                                    $class = '';
                                }

                                if(empty($linktext)) {
                                    $linktext = apply_filters('membership_subscription_signup_text', __('Complete Registration', 'membership'));
                                }

                                $html = "<a href='" . $link . "' class='button " . $class . " " . apply_filters('membership_subscription_button_color', 'blue') . "'>" . $linktext . " </a>";
                                echo $html;
                            ?>

You need to escape the quotes with a backslash, like so:

$html = "<a href='" . $link . "' target=\"_blank\" class='button " . $class . " " . apply_filters('membership_subscription_button_color', 'blue') . "'>" . $linktext . " </a>";