Jump to content

Weird instances with single quotes


Xtremer360

Recommended Posts

Well when I'm inside the html editor of a page edit I am using single quotes but then after I submit the changes and have it echo out queries for testing it turns the single quotes into backticks. Has this happened to anyone else?

Even when I type this code into the HTML view of the page editor inside of WordPress I still get that problem. The code and link are below.

 

kansasoutlawwrestling.com/roster

 

<div id="roster" class="content">
<h1 class="pageheading">Singles Biographies</h1>
<span class="minilinks"><a href="/roster/tag-team-roster">Tag Teams</a> | <a href="/roster/stable-roster">Stables</a> | <a href="/roster/manager-roster">Managers</a> | <a href="/roster/referee-roster">Referees</a> | <a href="/roster/staff-roster">Staff</a></span>

<?php      
$query = "SELECT 
    characters.shortName, 
    characters.characterName
FROM 
    characters as characters 
    LEFT JOIN singles as singles 
        ON characters.ID = singles.characterID 
WHERE 
    characters.styleID = '1' AND characters.statusID = 1
ORDER BY 
    characters.sortOrder";
$result = mysqli_query ( $dbc, $query );
echo $query;
while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) {
  $fieldarray = array('shortName','characterName');
  foreach ($fieldarray as $fieldlabel) {
      if (isset($row[$fieldlabel])) {
          $fieldlabel = $row[$fieldlabel];
      }
  }
?>

    <div id="wrestler">
        
        <div id="headshot">
        
        <?php 
        if (file_exists('/images/headshots/' . $shortName . '.png')) {
            print '<img src="images/headshots/' . $shortName . '.png">';
        } else {
            print '<img src="images/headshots/default.png">';
        }
        ?>
        
        </div>
        
        <div id="wrestler-info">
        
        <span class="rostername"><a class="biolinks" href="/bio?shortName=<?php echo $shortName;  ?>"><?php echo $characterName; ?></a></span>
        
        </div>
        
    </div>

<?php 
}
?>

</div>

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.