# PHP - what am I doing wrong?

**URL:** https://forum.kirupa.com/t/php-what-am-i-doing-wrong/44401
**Category:** programming
**Created:** [March 3, 2004, 3:06pm UTC](https://forum.kirupa.com/t/php-what-am-i-doing-wrong/44401 "2004-03-03T15:06:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![imagined](https://avatars.discourse-cdn.com/v4/letter/i/a87d85/32.png) [@imagined](https://forum.kirupa.com/u/imagined)
#### Post date: [March 3, 2004, 3:06pm UTC](https://forum.kirupa.com/t/php-what-am-i-doing-wrong/44401/1 "2004-03-03T15:06:40Z")

</div>

Hello! :hr:

I have this:  
database:CONTENT  
table: HEADING

table HEADING has columns: ID, h1, section, and date\_modified.

In table HEADING, column h1, I’m supposed to have headings stored, so I can use them dynamically. This is what I’m trying to achive:

Get the results of:  
SELECT h1 FROM heading WHERE section = ‘super’;

and display them. This is the code that I have and doesn’t work:

$head = “super”;  
$select\_h = mysql\_query(“SELECT h1 FROM heading WHERE section = ‘$head’”);   
$fetch\_row = mysql\_fetch\_assoc($select\_h);  
$content = $fetch\_row[‘content’];

if ($content)  
{  
echo ("$content");  
}  
else  
{  
echo (“You sure are stupid.”);  
}

Since echo("$content"); doesn’t work, the code displays “You sure are stupid”. Please help, I’m a begginner here. :h:

Thanks in advance,

Leo
