My Girlfriend looked at me and said, "You're not doing it right!"

So I showed it to her:

PHP Code:
function get_html_translation ($html_translation_id$language_id) {
    
$query "SELECT html_text FROM html WHERE html_translation_id = '$html_translation_id' AND language_id = '$language_id'";
    
$result mysql_query($query);
    
$rows mysql_num_rows($result);
    if (
$rows 0) {
        while (
$array mysql_fetch_assoc($result)) {
            
$html $array['html_text'];
        }
    }
    else {
        
$query "SELECT html_text FROM html WHERE html_translation_id = '$html_translation_id' AND language_id = '1'";
        
$result mysql_query($query);
        if (
$rows 0) {
            while (
$array mysql_fetch_assoc($result)) {
                
$html $array['html_text'];
            }
        }
        else {
            
$html '<p>[no_data]</p>';
        }
    }
    return 
$html;
}

function 
popup() {
    
$html get_html_translation($html_translation_id$language_id);
    
$popup '<a href="#" id="pop" >PopUp</a><br />
    <div id="overlay_form" style="display:none">'
    
.$html.'
    <a href="#" id="close" >Close</a>
    </div>'
;
    return 
$popup;
}


$language_id '1';
$html_translation_id '1';
$popup popup();
/*
$html = get_html_translation($html_translation_id, $language_id);
    $popup = '<div id="overlay_form" style="display:none">'
    .$html.'
    <a href="#" id="close" >Close</a></div>';
    
*/

$translation get_html_translation ($html_translation_id$language_id);
$output $output.$translation.$popup
"That's not how you put a function inside a function". - she said.

Help me restore my self worth.

How do you put a function inside a function?