I am new to oops in php,please help.. here inside a variable i am retriving the result
$value2=$vicaso->query_result();
by printing the array with
print_r ($value2);
I am getting
Array( [0] => stdClass Object ( [dept_id] => DEPT-001 ))
how to echo or store the dept_id inside a variable..?
CodePudding user response:
This result return Array contains 1 element. To print using:
$value2[0]->dept_id
if you see structure or variable using:
var_dump($value2);
for correctly develpment using xdebug