lordzardeck Posted March 29, 2009 Share Posted March 29, 2009 For some reason I cannot get the duedate out of the $item_curculation array. Can someone please help me?!?!?! $item_circulation = self::get_circulation($itemid); $item_row['duedate'] = $item_circulation['duedate']; return $item_row; function get_circulation($itemid){ $sql = "SELECT * FROM `circulation` WHERE itemid = $itemid"; $query = self::$db->query($sql); $row = self::$db->fetch_row($query); $patronid = $row['patronid']; if($patronid){ $patron_sql = "SELECT * FROM `patron` WHERE patronid = $patronid"; $patron_query = self::$db->query($patron_sql); $patron_row = self::$db->fetch_row($patron_query);} $circulation['patronname'] = $patron_row['firstname']." ".$patron_row['lastname']; $circulation['patroncard'] = $patron_row['cardnumber']; $curculation['duedate'] = $row['datedue']; return $circulation ; } when I echo $curculation['duedate'] I get a result, but outside the function I get nothing. Link to comment https://forums.phpfreaks.com/topic/151661-cannot-get-data-out-of-an-array/ Share on other sites More sharing options...
lordzardeck Posted March 29, 2009 Author Share Posted March 29, 2009 also, I know the function is returning right, because I can call two other values in the array. Link to comment https://forums.phpfreaks.com/topic/151661-cannot-get-data-out-of-an-array/#findComment-796445 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.