get value of a function inside a function in a loop
<p>I have a function from which I am getting values for user's friends. I am trying to call another function inside a loop present in the first function, but it says function not found. </p>

<p>Code: </p>

<pre><code>function displayUsersIcons($criteria) {
    $users = $criteria['users'];
    $nb_display = $criteria['nb_display'];
    $width = $criteria['width'];

    if ($width == '') $width = "200";

    if ($nb_display &gt; count($users) || $nb_display == '') $nb_display = count($users); //display value never bigger than nb users

    $display = '';
    for ($i = 0; $i &lt; $nb_display; $i++) {
        $name = $users[$i]['name'];
        $picture = $users[$i]['picture'];
        $url = $users[$i]['url'];
        $user_id = $users[$i]['id'];
        $display. = '&lt;li class="mispan main-span" data="'.$user_id.
        '" unme="'.$name.
        '" upic="'.$picture.
        '"&gt;';
        $display. = '&lt;div class="thumbnail"&gt;';
        $display. = '&lt;h3 class="miheader"&gt;'.$name.
        '&lt;/h3&gt;';
        $display. = '&lt;a href="'.$url.
        '" target="_blank" title="'.$name.
        '"&gt;';
        $display. = '&lt;div class="miprofile-pic-cnt" style="background-image:url('.$picture.
        ')" &gt;&lt;/div&gt;';
        $display. = '&lt;/a&gt;';
        $display. = '&lt;div class="caption"&gt;';
        $display. = '&lt;p&gt;&lt;a href="#" class="btn kssico"&gt;&lt;img src="Iconos/lips.png" /&gt;&lt;span class="mi-val"&gt;&lt;/span&gt;&lt;/a&gt; &lt;a href="#" class="btn bdico"&gt;&lt;img src="Iconos/bed.png" /&gt;&lt;span class="mi-val"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;';
        $display. = '&lt;/div&gt;';
        $display. = '&lt;/div&gt;';
        $display. = '&lt;/li&gt;';
    }
    return $display;
}
</code></pre>

<p>I wanted to call another function, and get its value in between <code>&lt;span class="mi-val"&gt;&lt;/span&gt;</code>. The other function is:</p>

<pre><code>function displaylipscount($user_id, $name) {
    $check = mysql_query("select * from action_kiss where for_uid ='$user_id'");
    return $row_check = mysql_num_rows($check);
}
</code></pre>
