-
[php]Array
ok,so i have created a page,1 problem:
that should be a number,
PHP Code:
<? if (isset($_SESSION['user'])){$login = stripslashes($_SESSION['user']);}
include('config.php');
$login = Clean_var($login);
$query =$db->Execute("Select Rangas from akauntai where akauntas=?",array($login));
$query2 = $query ->fetchrow();
echo($query2);
?>
thanx for your help :winky:
-
Re: [php]Array
$query2 is an array, to view its content, simply do this:
print_r($query2);
You will have to do something like this to get a number: $query2['id'], or $query2[0]
-
Re: [php]Array
still bad - i only need the number :(
EDIT: found the problem, didn't see what u right :)
Thank you daevius!!!