how can i get value of string in function1 returned in function2
<p>how can i get value of string in function1 returned in function2 i.e</p>

<pre><code>function fnc1(){
var text = fnc2("Pencils");
alert(text);
}

function fnc2(mytext){
$.post("process.php", {t:mytext}, function(data){
return data;
});
}
</code></pre>

<p>In process.php </p>

<pre><code>&lt;?php
echo $_POST['t'];
?&gt;
</code></pre>

<p>it is returning undefined.</p>
