function help
Posted: Sat Nov 25, 2006 2:44 pm
feyd | Please use
value of $act is coming from other page with $_get['somevalue'].
function is working fine but I am unable to use the value of $albnumber outside of the function. I tried "return" but unable to get the value. I have multiple variables inside the function and I want to use their values inside the script. Anyone can help ?
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi
How can I get the value of the $albnumber out of the function?Code: Select all
function test($act)
{
$alquery = mysql_query("SELECT * FROM active WHERE apro='Albe' AND ar LIKE '%$act%'");
$albnumber=mysql_num_rows($alquery);
echo $albnumber;
}function is working fine but I am unable to use the value of $albnumber outside of the function. I tried "return" but unable to get the value. I have multiple variables inside the function and I want to use their values inside the script. Anyone can help ?
Thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]