characters being replaced/removed when running in browser?
<p>I have this website html page (.php file), and at some point I have this php script (Take a good look at the input's onclick attribute, as the problem revolves around there): The full php script is at the bottom at the post.</p>

<pre><code>&lt;?php
    require $_SERVER["DOCUMENT_ROOT"]."my-site/Database/db_connection.php"; 
    /*Some code was here.*/
    while($Student=$Result-&gt;fetch_row()){
        echo "&lt;input class='Content_Link' id='".$Student[0]."' type='button' value='".$Student[1]." ".$Student[2]."' onclick='redirecter('.''.')'/&gt;";
    }
/*normally a url would be passed into redirecter. To simplify the code during debugging, 
I have removed the url*/
    mysqli_free_result($Result);
    $Conn-&gt;close();
    /*a little more code*/
?&gt;
</code></pre>

<p>The button is displaying correctly, however...
When the button is pressed, I get an unexpected token }, a rather simple error, until I compare the code in my text editor to the code in browser's developer tool.</p>

<p>Furthermore, addressing the unexpected token, after thoroughly checking all { } pairs in the php script and all required/included files inside the script (3+ times). All pairs are accounted for and completed. No extra brackets were found.</p>

<p>So far I have tried the website in microsoft edge, google chrome and firefox. They are all showing weird things with the onclick attribute:</p>

<p>text editor -</p>

<pre><code>&lt;input class='Content_Link' id='".$Student[0]."' type='button' value='".$Student[1]." ".$Student[2]."' onclick='redirecter('.''.')'/&gt;
</code></pre>

<p>(With the php values placed directly in:)</p>

<pre><code>&lt;input class='Content_Link' id='2' type='button' value='Tyler Breau' onclick='redirecter('.''.')'/&gt;
</code></pre>

<p>Chrome - </p>

<pre><code>&lt;input class="Content_Link" id="2" type="button" value="Tyler Breau" onclick="redirecter(" .''.')'&gt;
</code></pre>

<p>Firefox - </p>

<pre><code>&lt;input id="2" class="Content_Link" value="Tyler Breau" onclick="redirecter(" .''.')'="" type="button"&gt;&lt;/input&gt;
</code></pre>

<p>Microsoft Edge (Weirdest of them all) - </p>

<pre><code>&lt;input class="Content_Link" id="2" onclick="redirecter(" type="button" .''.')'="" value="Tyler Breau" /&gt;
</code></pre>

<p>The differences:</p>

<p>At</p>

<pre><code>onclick='redirecter('.''.')'/&gt; 
</code></pre>

<p>the browsers' developer tools are displaying this as following common difference:</p>

<pre><code>onclick="redirector(" .''.')'&gt;
</code></pre>

<p>The first single quot: ' in the brackets is being placed by a double quot followed by a space: " . Furthermore, the forward slash for ending the input tag is being removed. '/> becomes '></p>

<p>Firefox got a little more funky by adding ="" to the end of redirecter:</p>

<pre><code>"redirecter(" .''.')'=""
</code></pre>

<p>And Microsoft Edge even more funky by placing the type="button" in side the redirecter brackets:</p>

<pre><code>"redirecter(" type="button" .''.')'=""
</code></pre>

<p>My question... What in the world is going on? How do you even begin debugging this...</p>

<p>Programs/Version/etc I am using:</p>

<p>Sublime 3</p>

<p>Apache 2.4.17 (all in package from <a href="http://www.wampserver.com/en/" rel="nofollow">http://www.wampserver.com/en/</a> )</p>

<p>PHP 7</p>

<p>HTML5</p>

<p>Full php script:</p>

<p>Included and Required code are encased in commented out include (start) and 'End Include' or 'End Require' (end). An example is present at the very start of the php script.</p>

<pre><code>&lt;?php 
    //include $_SERVER["DOCUMENT_ROOT"]."my-site/General/get_user_type.php";
        require $_SERVER["DOCUMENT_ROOT"]."my-site/Database/db_connection.php";//No brackets are present in file
        if(!(isset($_SESSION))){
            session_start();
        }
        $Result=mysqli_query($Conn, "SELECT Type FROM user_accounts WHERE ID=".$_SESSION["uid"]);
        $Type=$Result-&gt;fetch_object()-&gt;Type;
        mysqli_free_result($Result);
        $Conn-&gt;close();
    //End include
    if($Type === "Admin"){
        echo "&lt;div class='Sub_Content' id='div_Student_List'&gt;
                &lt;p class='Sub_Content_Title'&gt; Student List &lt;/p&gt;

                &lt;input class='Content_Link_Viewer' id='btn_Student_List' type='button' value='show' name='div_Students' onclick='displayContent(this.id, this.value)'/&gt;
                &lt;p class='Content_Link_Describer'&gt; - Students &lt;/p&gt;&lt;br/&gt;
                &lt;div class='Content_Link_Holder' id='div_Students'&gt;";
                    //require $_SERVER["DOCUMENT_ROOT"]."my-site/Home_Page/student_list.php";
                        require $_SERVER["DOCUMENT_ROOT"]."my-site/Database/db_connection.php";//No brackets are present in this file
                        $Result=mysqli_query($Conn,"SELECT Class_Code FROM user_accounts WHERE ID=".$_SESSION["uid"]);
                        if($Result===false){
                            $Conn-&gt;close();
                            $Student_List="Oops! Failed to get Student List";
                        }else{
                            $Class_Code=$Result-&gt;fetch_object()-&gt;Class_Code;
                            mysqli_free_result($Result);
                            $Result=mysqli_query($Conn,"SELECT Student_ID, Student_First_Name, Student_Last_Name FROM student_list WHERE Class_Code='$Class_Code'");
                            if($Result===false){
                                $Conn-&gt;close();
                                $Student_List="Oops! Failed to get Student List";
                            }else{
                                while($Student=$Result-&gt;fetch_row()){
/*Problem button here*/             echo "&lt;input class='Content_Link' id='".$Student[0]."' type='button' value='".$Student[1]." ".$Student[2]."' onclick='redirecter('.''.')'/&gt;";
                                }
                                mysqli_free_result($Result);
                                $Conn-&gt;close();
                            }
                        }
                    //End Require
        echo    "&lt;/div&gt;
            &lt;/div&gt;";
    }
?&gt;
</code></pre>