PHP Fatal error - Undefined function
<p>I realise this is a bit vague but hoping someone might be able to point me in the right direction.</p>

<p>This is the error: <strong>Fatal error: Call to undefined function print_row() on line 418</strong></p>

<p>Cause by this line:</p>

<pre><code>**$something = profile_display_fields($css-&gt;id);**
</code></pre>

<p>In this code: </p>

<pre><code>$customcss = get_records_select('user_info_field', '', 'sortorder ASC');

foreach ($customcss as $css) {
  if ($css-&gt;name == 'usercss') {
   $something = profile_display_fields($css-&gt;id);
  }
}
</code></pre>

<p>Here is line 418: </p>

<pre><code>print_row(s($formfield-&gt;field-&gt;name.':'), $formfield-&gt;display_data());
</code></pre>

<p>And here is the whole function:</p>

<pre><code>function profile_display_fields($userid) {
    global $CFG, $USER;

    if ($categories = get_records_select('user_info_category', '', 'sortorder ASC')) {
        foreach ($categories as $category) {
            if ($fields = get_records_select('user_info_field', "categoryid=$category-&gt;id", 'sortorder ASC')) {
                foreach ($fields as $field) {
                    require_once($CFG-&gt;dirroot.'/user/profile/field/'.$field-&gt;datatype.'/field.class.php');
                    $newfield = 'profile_field_'.$field-&gt;datatype;
                    $formfield = new $newfield($field-&gt;id, $userid);
                    if ($formfield-&gt;is_visible() and !$formfield-&gt;is_empty()) {
                        print_row(s($formfield-&gt;field-&gt;name.':'), $formfield-&gt;display_data());
                    }
                }
            }
        }
    }
}
</code></pre>
