I am trying to create a function to extract, the weight or Height.... from Icecat catalog via ean product.
Do you have any idea about the synthax ?
I am little lost with all the data.
Thank you.
// call catalog
public function getSearchProductEanXML() {
$ean = $this->ean;
$language = $this->lang;
if($this->ean == null) {
return 0;
}
$url = 'http://data.icecat.biz/xml_s3/xml_server3.cgi?ean_upc=' . $ean . ';lang=' . $language . ';output=productxml';
$context = stream_context_create(array('http' => array( 'header' => "Authorization: Basic " . base64_encode($this->username . ":" . $this->password) )));
$data = file_get_contents($url, false, $context);
$xml = new SimpleXMLElement($data);
return $xml;
}
// function to extract weight
public function getProductWeight() {
$xml = $this->getSearchProductEanXML();
$product_pdf_weight = $xml->xpath("//ProductFeature");
foreach($product_pdf_weight as $item) {
$weight = $item->attributes();
var_dump($weight);
var_dump('<hr>');
// $WeightItem = new SimpleXMLElement($item->asXML());
// $weight = $WeightItem->xpath("//Name");
// var_dump($weight);
// $weight = $weight['Value'];
}
exit;
return $weight;
}
$ean = '0013803146813';
$icecat = new IceCat($ean, 'en');
echo '<br>';
echo $icecat->getProductWeight();
" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "2715" ["langid"]=> string(1) "1" ["Value"]=> string(17) "Maximum scan size" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "2985" ["langid"]=> string(1) "1" ["Value"]=> string(27) "Optical scanning resolution" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "3131" ["langid"]=> string(1) "1" ["Value"]=> string(15) "Colour scanning" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(5) "30724" ["langid"]=> string(1) "1" ["Value"]=> string(15) "Duplex scanning" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "615813" ["langid"]=> string(1) "1" ["Value"]=> string(18) "Input colour depth" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "615854" ["langid"]=> string(1) "1" ["Value"]=> string(19) "Output colour depth" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "1445" ["langid"]=> string(1) "1" ["Value"]=> string(17) "Gray scale levels" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "2605" ["langid"]=> string(1) "1" ["Value"]=> string(12) "Scanner type" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "5487" ["langid"]=> string(1) "1" ["Value"]=> string(17) "Colour of product" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "4899" ["langid"]=> string(1) "1" ["Value"]=> string(11) "Sensor type" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "619793" ["langid"]=> string(1) "1" ["Value"]=> string(22) "Daily duty cycle (max)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "5543" ["langid"]=> string(1) "1" ["Value"]=> string(12) "Light source" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "3177" ["langid"]=> string(1) "1" ["Value"]=> string(41) "Auto document feeder (ADF) input capacity" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "619834" ["langid"]=> string(1) "1" ["Value"]=> string(30) "Scanning media types supported" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(5) "11529" ["langid"]=> string(1) "1" ["Value"]=> string(39) "Auto Document Feeder (ADF) media weight" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "615486" ["langid"]=> string(1) "1" ["Value"]=> string(19) "Standard interfaces" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "2257" ["langid"]=> string(1) "1" ["Value"]=> string(27) "Power consumption (typical)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "9104" ["langid"]=> string(1) "1" ["Value"]=> string(27) "Power consumption (standby)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(5) "27753" ["langid"]=> string(1) "1" ["Value"]=> string(15) "Input frequency" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "4629" ["langid"]=> string(1) "1" ["Value"]=> string(13) "Input voltage" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(6) "617692" ["langid"]=> string(1) "1" ["Value"]=> string(35) "Windows operating systems supported" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "3765" ["langid"]=> string(1) "1" ["Value"]=> string(27) "Operating temperature (T-T)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "2937" ["langid"]=> string(1) "1" ["Value"]=> string(33) "Operating relative humidity (H-H)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "9056" ["langid"]=> string(1) "1" ["Value"]=> string(27) "Operating temperature (T-T)" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "3207" ["langid"]=> string(1) "1" ["Value"]=> string(21) "Energy Star certified" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "1525" ["langid"]=> string(1) "1" ["Value"]=> string(6) "Weight" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#55 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "5143" ["langid"]=> string(1) "1" ["Value"]=> string(5) "Width" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#57 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "5145" ["langid"]=> string(1) "1" ["Value"]=> string(5) "Depth" } } } string(4) "" array(1) { [0]=> object(SimpleXMLElement)#56 (1) { ["#attributes"]=> array(3) { ["ID"]=> string(4) "4625" ["langid"]=> string(1) "1" ["Value"]=> string(6) "Height" } } }
Related
I have a massive array that i can't get data out of. I can only get data out of the first set of items.
I need to get to
["USFICO"]=>
array(3) {
["FICOScore"]=>
string(5) "00650"
out of it. But i can only get the top portion to work w/ $tester = $array['EfxReport']['#attributes']['reportId']; outputs to string(22) "USConsumerCreditReport" as expected.
how can i get the FICO score out of this array.
Here is the array.
array(1) {
["EfxReport"]=>
array(3) {
["#attributes"]=>
array(2) {
["requestNumber"]=>
string(1) "1"
["reportId"]=>
string(22) "USConsumerCreditReport"
}
["USDecisionPowerExpressReports"]=>
array(1) {
["USDecisionPowerExpressReport"]=>
array(4) {
["#attributes"]=>
array(2) {
["subjectType"]=>
string(7) "Subject"
["multipleNumber"]=>
string(1) "1"
}
["USMasterHeader"]=>
array(5) {
["CustomerReferenceNumber"]=>
string(6) "EFX QA"
["CustomerNumber"]=>
string(10) "999KI00553"
["ECOAInquiryType"]=>
string(1) "I"
["DateOfRequest"]=>
string(10) "02/23/2017"
["EquifaxReferenceNumber"]=>
string(9) "187391427"
}
["USConsumerCreditReport"]=>
array(6) {
["#attributes"]=>
array(2) {
["subjectType"]=>
string(7) "Subject"
["multipleNumber"]=>
string(1) "1"
}
["USHeader"]=>
array(3) {
["Request"]=>
array(6) {
["CustomerReferenceNumber"]=>
string(6) "EFX QA"
["CustomerNumber"]=>
string(10) "999KI00553"
["ConsumerReferralCode"]=>
string(3) "024"
["ECOAInquiryType"]=>
string(1) "I"
["NumberOfMonthsToCountInquiries"]=>
string(14) "Last 24 Months"
["NumberOfMonthsToCountDelinquencies"]=>
string(23) "Last 6 Years, 11 Months"
}
["CreditFile"]=>
array(11) {
["HitCode"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "1"
["description"]=>
string(3) "Hit"
}
}
["FileSinceDate"]=>
string(10) "04/16/2003"
["DateOfLastActivity"]=>
string(10) "01/24/2017"
["DateOfRequest"]=>
string(10) "02/23/2017"
["Identityscans"]=>
array(1) {
["Identityscan"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "8"
["description"]=>
string(74) "Unable to perform telephone validation due to insufficient telephone input"
}
}
}
["AddressDiscrepancyIndicator"]=>
string(1) "N"
["CreateCode"]=>
string(1) "2"
["FileStatus1"]=>
string(3) "016"
["FileStatus2"]=>
string(3) "242"
["FileStatus3"]=>
string(3) "004"
["BureauCode"]=>
string(3) "244"
}
["Subject"]=>
array(2) {
["SubjectName"]=>
array(3) {
["LastName"]=>
string(7) "DGNNLXZ"
["FirstName"]=>
string(7) "CHANITA"
["MiddleName"]=>
string(1) "S"
}
["SubjectId"]=>
array(2) {
["SubjectSSN"]=>
string(8) "66639074"
["DateOfBirth"]=>
string(10) "08/17/1988"
}
}
}
["USAddresses"]=>
array(1) {
["USAddress"]=>
array(3) {
[0]=>
array(8) {
["#attributes"]=>
array(2) {
["code"]=>
string(2) "CA"
["description"]=>
string(15) "Current Address"
}
["ParsedStreetAddress"]=>
array(3) {
["StreetNumber"]=>
string(4) "4338"
["StreetName"]=>
string(9) "W POTOMAC"
["StreetType"]=>
string(3) "AVE"
}
["City"]=>
string(7) "CHICAGO"
["State"]=>
string(2) "IL"
["PostalCode"]=>
string(5) "60651"
["DateAddressFirstReported"]=>
string(7) "07/2015"
["AddressSource"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "T"
["description"]=>
string(4) "Tape"
}
}
["DateAddressLastReported"]=>
string(7) "02/2017"
}
[1]=>
array(8) {
["#attributes"]=>
array(2) {
["code"]=>
string(2) "FA"
["description"]=>
string(14) "Former Address"
}
["ParsedStreetAddress"]=>
array(3) {
["StreetNumber"]=>
string(4) "1301"
["StreetName"]=>
string(7) "BRUMMEL"
["StreetType"]=>
string(8) "ST APT 8"
}
["City"]=>
string(8) "EVANSTON"
["State"]=>
string(2) "IL"
["PostalCode"]=>
string(5) "60202"
["DateAddressFirstReported"]=>
string(7) "04/2015"
["AddressSource"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "T"
["description"]=>
string(4) "Tape"
}
}
["DateAddressLastReported"]=>
string(7) "04/2015"
}
[2]=>
array(8) {
["#attributes"]=>
array(2) {
["code"]=>
string(2) "F2"
["description"]=>
string(21) "Second Former Address"
}
["ParsedStreetAddress"]=>
array(3) {
["StreetNumber"]=>
string(4) "1208"
["StreetName"]=>
string(11) "W JEFFERSON"
["StreetType"]=>
string(8) "ST APT C"
}
["City"]=>
string(11) "SPRINGFIELD"
["State"]=>
string(2) "IL"
["PostalCode"]=>
string(5) "62702"
["DateAddressFirstReported"]=>
string(7) "06/2014"
["AddressSource"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "T"
["description"]=>
string(4) "Tape"
}
}
["DateAddressLastReported"]=>
string(7) "06/2014"
}
}
}
["USEmployments"]=>
array(1) {
["USEmployment"]=>
array(3) {
["#attributes"]=>
array(2) {
["code"]=>
string(2) "ES"
["description"]=>
string(24) "Last Reported Employment"
}
["Occupation"]=>
string(14) "CORRECTION OFF"
["Employer"]=>
string(18) "MACON STATE PRISON"
}
}
["USFICO"]=>
array(3) {
["FICOScore"]=>
string(5) "00650"
["ScoreReasons"]=>
array(1) {
["ScoreReason"]=>
array(4) {
[0]=>
array(1) {
["#attributes"]=>
array(3) {
["code"]=>
string(5) "00038"
["description"]=>
string(69) "Serious delinquency, and derogatory public record or collection filed"
["number"]=>
string(1) "1"
}
}
[1]=>
array(1) {
["#attributes"]=>
array(3) {
["code"]=>
string(5) "00010"
["description"]=>
string(76) "Prop of balances to credit limits is too high on bank rev or other rev accts"
["number"]=>
string(1) "2"
}
}
[2]=>
array(1) {
["#attributes"]=>
array(3) {
["code"]=>
string(5) "00018"
["description"]=>
string(35) "Number of accounts with delinquency"
["number"]=>
string(1) "3"
}
}
[3]=>
array(1) {
["#attributes"]=>
array(3) {
["code"]=>
string(5) "00014"
["description"]=>
string(45) "Length of time accounts have been established"
["number"]=>
string(1) "4"
}
}
}
}
["ScoreIndicator"]=>
array(1) {
["#attributes"]=>
array(2) {
["code"]=>
string(1) "J"
["description"]=>
string(39) "FICO Score 5 based on Equifax Data (NF)"
}
}
}
["USIdentificationSSN"]=>
array(4) {
["MDBSubjectSSN"]=>
string(9) "666390749"
["InquirySubjectSSN"]=>
string(9) "666390749"
["InquirySSNDateIssued"]=>
string(4) "1992"
["InquirySSNStateIssued"]=>
string(2) "GA"
}
}
["USDecisionPowerExpressSegment"]=>
array(4) {
["ConsumerDisclosureIndicator"]=>
array(0) {
}
["ReportTextMessage"]=>
string(7) "OFFER C"
["SSNVarianceIndicator"]=>
array(0) {
}
["DPExpressProducts"]=>
array(1) {
["DPExpressProduct"]=>
array(4) {
[0]=>
array(5) {
["#attributes"]=>
array(1) {
["number"]=>
string(1) "1"
}
["Description"]=>
string(1) "A"
["ApprovalIndicator"]=>
string(1) "N"
["Limit"]=>
array(0) {
}
["Miscellaneous"]=>
array(0) {
}
}
[1]=>
array(5) {
["#attributes"]=>
array(1) {
["number"]=>
string(1) "2"
}
["Description"]=>
string(1) "B"
["ApprovalIndicator"]=>
string(1) "N"
["Limit"]=>
array(0) {
}
["Miscellaneous"]=>
array(0) {
}
}
[2]=>
array(5) {
["#attributes"]=>
array(1) {
["number"]=>
string(1) "3"
}
["Description"]=>
string(1) "C"
["ApprovalIndicator"]=>
string(1) "Y"
["Limit"]=>
array(0) {
}
["Miscellaneous"]=>
array(0) {
}
}
[3]=>
array(5) {
["#attributes"]=>
array(1) {
["number"]=>
string(1) "4"
}
["Description"]=>
string(1) "D"
["ApprovalIndicator"]=>
string(1) "N"
["Limit"]=>
array(0) {
}
["Miscellaneous"]=>
array(0) {
}
}
}
}
}
}
}
["USPrintImage"]=>
array(0) {
}
}
}
What's the error you're getting? Try:
$tester = $array['EfxReport']['USDecisionPowerExpressReports']['USDecisionPowerExpressReport']['USConsumerCreditReport']['USFICO']['FICOScore'];
Also I really hope this is fake data, you've included very personal/sensitive information in your array printout.
I'm having trouble getting specific values from an array. I have tried this but it doesn't work.
$item1 = $this->request->post['banner_image'];
foreach($item1 as $k => $v)
{
if($k == 'top' && $v > 0)
{
echo $v.' - ';
}
}
I need to get only a few values... such us [top] and [left] for each one .
This is the var_dump($_POST);
array(2) {
["pavcontentslider_module"]=>
array(1) {
[0]=>
array(11) {
["layout_id"]=>
string(1) "1"
["position"]=>
string(9) "slideshow"
["status"]=>
string(1) "1"
["sort_order"]=>
string(1) "1"
["auto_play"]=>
string(1) "0"
["text_interval"]=>
string(4) "8000"
["width"]=>
string(4) "1170"
["height"]=>
string(3) "540"
["image_navigator"]=>
string(1) "1"
["navimg_weight"]=>
string(3) "184"
["navimg_height"]=>
string(2) "81"
}
}
["banner_image"]=>
array(6) {
[1]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider3.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "testo"
}
[1]=>
array(1) {
[0]=>
string(8) "engtesto"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "tossing"
}
[1]=>
array(1) {
[0]=>
string(6) "bounce"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(12) "banner-info1"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "90"
}
[1]=>
array(1) {
[0]=>
string(3) "160"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(3) "660"
}
[1]=>
array(1) {
[0]=>
string(3) "335"
}
}
}
[2]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider7.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "test2"
}
[1]=>
array(1) {
[0]=>
string(8) "engtest2"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "slideUp"
}
[1]=>
array(1) {
[0]=>
string(7) "slideUp"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(12) "banner-info1"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "91"
}
[1]=>
array(1) {
[0]=>
string(3) "183"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(3) "210"
}
[1]=>
array(1) {
[0]=>
string(3) "432"
}
}
}
[3]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider5.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "testo"
}
[1]=>
array(1) {
[0]=>
string(7) "resrser"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "slideUp"
}
[1]=>
array(1) {
[0]=>
string(7) "slideUp"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(11) "banner-info"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "10"
}
[1]=>
array(1) {
[0]=>
string(2) "29"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "20"
}
[1]=>
array(1) {
[0]=>
string(2) "66"
}
}
}
[4]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider6.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "testo"
}
[1]=>
array(1) {
[0]=>
string(4) "teso"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "slideUp"
}
[1]=>
array(1) {
[0]=>
string(7) "slideUp"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(11) "banner-info"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "27"
}
[1]=>
array(1) {
[0]=>
string(2) "22"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "61"
}
[1]=>
array(1) {
[0]=>
string(2) "66"
}
}
}
[5]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider8.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "testo"
}
[1]=>
array(1) {
[0]=>
string(6) "tes6yo"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "slideUp"
}
[1]=>
array(1) {
[0]=>
string(7) "slideUp"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(11) "banner-info"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "20"
}
[1]=>
array(1) {
[0]=>
string(2) "14"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "38"
}
[1]=>
array(1) {
[0]=>
string(2) "57"
}
}
}
[6]=>
array(7) {
["image"]=>
string(26) "data/slider/imgslider2.jpg"
["link"]=>
string(0) ""
["title"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(5) "testo"
}
[1]=>
array(1) {
[0]=>
string(5) "testo"
}
}
["effect"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(7) "slideUp"
}
[1]=>
array(1) {
[0]=>
string(7) "slideUp"
}
}
["class"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(11) "banner-info"
}
[1]=>
array(1) {
[0]=>
string(11) "banner-info"
}
}
["top"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "29"
}
[1]=>
array(1) {
[0]=>
string(2) "25"
}
}
["left"]=>
array(2) {
[4]=>
array(1) {
[0]=>
string(2) "66"
}
[1]=>
array(1) {
[0]=>
string(2) "47"
}
}
}
}
}
A way to have a better look at your results are to first echo "<pre>"; before you var_dump. That will allow you to see how the array is formatted better. My guess is that the $key you're searching for is embedded at a deeper level. If you're still having trouble parsing it yourself try editing your post to allow us to see a better formatted view. It's hard to see but try echoing (without the for loop) $item1[1]['image'] and see if anything is spit out. I think the values you are interested are actually within $item1[1] rather than just $item1. Hopefully that made sense.
I've updated a Drupal from version 7.2 to version 7.26.
After do that I've some errors:
throw new EntityMalformedException (Missing bundle property on entity of type taxonomy_term)
It appears in file common . inc:
if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
I insert some "echos" to see when is shown this message, and I get this:
var_dump( $info['entity keys']);
array(4) {
["id"]=>
string(3) "tid"
["bundle"]=>
string(23) "vocabulary_machine_name"
["label"]=>
string(4) "name"
["revision"]=>
string(0) ""
}
array(4) {
["id"]=>
string(3) "tid"
["bundle"]=>
string(23) "vocabulary_machine_name"
["label"]=>
string(4) "name"
["revision"]=>
string(0) ""
}
var_dump( $info);
array(22) {
["label"]=>
string(22) "Término de taxonomía"
["controller class"]=>
string(22) "TaxonomyTermController"
["base table"]=>
string(18) "taxonomy_term_data"
["uri callback"]=>
string(17) "taxonomy_term_uri"
["fieldable"]=>
bool(true)
["entity keys"]=>
array(4) {
["id"]=>
string(3) "tid"
["bundle"]=>
string(23) "vocabulary_machine_name"
["label"]=>
string(4) "name"
["revision"]=>
string(0) ""
}
["bundle keys"]=>
array(1) {
["bundle"]=>
string(12) "machine_name"
}
["bundles"]=>
array(3) {
["pais"]=>
array(3) {
["label"]=>
string(7) "Regions"
["admin"]=>
array(4) {
["path"]=>
string(58) "admin/structure/taxonomy/%taxonomy_vocabulary_machine_name"
["real path"]=>
string(29) "admin/structure/taxonomy/pais"
["bundle argument"]=>
int(3)
["access arguments"]=>
array(1) {
[0]=>
string(19) "administer taxonomy"
}
}
["rdf_mapping"]=>
array(5) {
["rdftype"]=>
array(1) {
[0]=>
string(12) "skos:Concept"
}
["name"]=>
array(1) {
["predicates"]=>
array(2) {
[0]=>
string(10) "rdfs:label"
[1]=>
string(14) "skos:prefLabel"
}
}
["description"]=>
array(1) {
["predicates"]=>
array(1) {
[0]=>
string(15) "skos:definition"
}
}
["vid"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(13) "skos:inScheme"
}
["type"]=>
string(3) "rel"
}
["parent"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(12) "skos:broader"
}
["type"]=>
string(3) "rel"
}
}
}
["auto_created_voc38877"]=>
array(3) {
["label"]=>
string(10) "Provincias"
["admin"]=>
array(4) {
["path"]=>
string(58) "admin/structure/taxonomy/%taxonomy_vocabulary_machine_name"
["real path"]=>
string(46) "admin/structure/taxonomy/auto_created_voc38877"
["bundle argument"]=>
int(3)
["access arguments"]=>
array(1) {
[0]=>
string(19) "administer taxonomy"
}
}
["rdf_mapping"]=>
array(5) {
["rdftype"]=>
array(1) {
[0]=>
string(12) "skos:Concept"
}
["name"]=>
array(1) {
["predicates"]=>
array(2) {
[0]=>
string(10) "rdfs:label"
[1]=>
string(14) "skos:prefLabel"
}
}
["description"]=>
array(1) {
["predicates"]=>
array(1) {
[0]=>
string(15) "skos:definition"
}
}
["vid"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(13) "skos:inScheme"
}
["type"]=>
string(3) "rel"
}
["parent"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(12) "skos:broader"
}
["type"]=>
string(3) "rel"
}
}
}
["busquedas_destacadas_"]=>
array(3) {
["label"]=>
string(21) "Búsquedas destacadas"
["admin"]=>
array(4) {
["path"]=>
string(58) "admin/structure/taxonomy/%taxonomy_vocabulary_machine_name"
["real path"]=>
string(46) "admin/structure/taxonomy/busquedas_destacadas_"
["bundle argument"]=>
int(3)
["access arguments"]=>
array(1) {
[0]=>
string(19) "administer taxonomy"
}
}
["rdf_mapping"]=>
array(5) {
["rdftype"]=>
array(1) {
[0]=>
string(12) "skos:Concept"
}
["name"]=>
array(1) {
["predicates"]=>
array(2) {
[0]=>
string(10) "rdfs:label"
[1]=>
string(14) "skos:prefLabel"
}
}
["description"]=>
array(1) {
["predicates"]=>
array(1) {
[0]=>
string(15) "skos:definition"
}
}
["vid"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(13) "skos:inScheme"
}
["type"]=>
string(3) "rel"
}
["parent"]=>
array(2) {
["predicates"]=>
array(1) {
[0]=>
string(12) "skos:broader"
}
["type"]=>
string(3) "rel"
}
}
}
}
["view modes"]=>
array(1) {
["full"]=>
array(2) {
["label"]=>
string(34) "Página de términos de taxonomía"
["custom settings"]=>
bool(false)
}
}
["static cache"]=>
bool(true)
["field cache"]=>
bool(true)
["load hook"]=>
string(18) "taxonomy_term_load"
["translation"]=>
array(0) {
}
["schema_fields_sql"]=>
array(1) {
["base table"]=>
array(8) {
[0]=>
string(3) "tid"
[1]=>
string(3) "vid"
[2]=>
string(4) "name"
[3]=>
string(11) "description"
[4]=>
string(6) "format"
[5]=>
string(6) "weight"
[6]=>
string(8) "language"
[7]=>
string(9) "i18n_tsid"
}
}
["token type"]=>
string(4) "term"
["access callback"]=>
string(31) "entity_metadata_taxonomy_access"
["creation callback"]=>
string(29) "entity_metadata_create_object"
["save callback"]=>
string(18) "taxonomy_term_save"
["deletion callback"]=>
string(20) "taxonomy_term_delete"
["view callback"]=>
string(27) "entity_metadata_view_single"
["form callback"]=>
string(34) "entity_metadata_form_taxonomy_term"
["configuration"]=>
bool(false)
}
I supposed this is related with something missing in the database. But I can't find it.
Any help, please?
Thanks in advance.
Given the array below, how do I get values of object(stdClass) such as Pcv (campus Aalst), Mss ( Privaatpraktijk kinesitherapie Peeters Stefaan ), and so on?
array(106) {
[0]=>
object(stdClass)#8 (45) {
["nid"]=>
string(3) "199"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291279334"
["changed"]=>
string(10) "1301323146"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "206"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(18) "Pcv (campus Aalst)"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323146"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_revaki"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(3) "152"
}
}
["field_stagedomein_verpleeg"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(14) "niet opgegeven"
}
}
["field_status_datum"]=>
array(1) {
[0]=>
array(4) {
["value"]=>
NULL
["timezone"]=>
string(15) "Europe/Brussels"
["timezone_db"]=>
string(15) "Europe/Brussels"
["date_type"]=>
string(4) "date"
}
}
["field_locatieview"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "179"
}
}
["field_status_extra"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(6) "Actief"
}
}
["field_maxcapstud_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(2) "18"
}
}
["field_status_bevestigd_door"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_aanpers_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_extrainfo_stagedomein"]=>
array(1) {
[0]=>
array(2) {
["value"]=>
string(37) "Capaciteit: 3 studenten alle periodes"
["format"]=>
NULL
}
}
["field_percapaciteit_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_aanplaats_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_mentoren"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "178"
}
}
["field_persoon_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["has_body"]=>
string(1) "0"
["taxonomy"]=>
array(0) {
}
}
[1]=>
object(stdClass)#24 (45) {
["nid"]=>
string(3) "211"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291281467"
["changed"]=>
string(10) "1301323440"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "218"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(53) "Mss ( Privaatpraktijk kinesitherapie Walravens Marc )"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323440"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_revaki"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(3) "128"
}
}
["field_stagedomein_verpleeg"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(14) "niet opgegeven"
}
}
["field_status_datum"]=>
array(1) {
[0]=>
array(4) {
["value"]=>
NULL
["timezone"]=>
string(15) "Europe/Brussels"
["timezone_db"]=>
string(15) "Europe/Brussels"
["date_type"]=>
string(4) "date"
}
}
["field_locatieview"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "210"
}
}
["field_status_extra"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(6) "Actief"
}
}
["field_maxcapstud_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(1) "4"
}
}
["field_status_bevestigd_door"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_aanpers_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_extrainfo_stagedomein"]=>
array(1) {
[0]=>
array(2) {
["value"]=>
string(40) "Capaciteit: 1 student in periode 3 tem 6"
["format"]=>
NULL
}
}
["field_percapaciteit_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_aanplaats_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_mentoren"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "208"
}
}
["field_persoon_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["has_body"]=>
string(1) "0"
["taxonomy"]=>
array(0) {
}
}
[2]=>
object(stdClass)#26 (45) {
["nid"]=>
string(3) "217"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291281906"
["changed"]=>
string(10) "1301323440"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "224"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(54) "Mss ( Privaatpraktijk kinesitherapie Peeters Stefaan )"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323440"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
The object is at the index 0 in the array, so you just access the property names from there
echo $theArray[0]->title;
For more information, please see the PHP manual's Language Reference, especially
the chapter on Arrays and
the chapter on Objects
Update, solved
I try to retrieve the value of an object (stdClass)
I want to get the internship his name the title.
(["title"]=> string(53) "Mss ( Privaatpraktijk kinesitherapie Walravens Marc )").
My code:
foreach($gStartPositionStudents as $value) {
foreach($gStartPositionInternships as $value2) {
// each loop will add a row here.
$row = array();
// build the row
$row[] = array('data' => $value->field_ugentid_student[0]['value']);
$row[] = array('data' => $value2->title[0]['value']);
}
// add the row to the "big row data (contains all rows)
$rows[] = array('data' => $row);
}
$output = theme('table', $header, $rows);
return $output;
Object array:
enter code here
array(148) {
[0]=>
object(stdClass)#466 (45) {
["nid"]=>
string(3) "199"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291279334"
["changed"]=>
string(10) "1301323146"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "206"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(18) "Pcv (campus Aalst)"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323146"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_revaki"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(3) "152"
}
}
["field_stagedomein_verpleeg"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(14) "niet opgegeven"
}
}
["field_status_datum"]=>
array(1) {
[0]=>
array(4) {
["value"]=>
NULL
["timezone"]=>
string(15) "Europe/Brussels"
["timezone_db"]=>
string(15) "Europe/Brussels"
["date_type"]=>
string(4) "date"
}
}
["field_locatieview"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "179"
}
}
["field_status_extra"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(6) "Actief"
}
}
["field_maxcapstud_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(2) "18"
}
}
["field_status_bevestigd_door"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_aanpers_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_extrainfo_stagedomein"]=>
array(1) {
[0]=>
array(2) {
["value"]=>
string(37) "Capaciteit: 3 studenten alle periodes"
["format"]=>
NULL
}
}
["field_percapaciteit_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_aanplaats_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_mentoren"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "178"
}
}
["field_persoon_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["has_body"]=>
string(1) "0"
["taxonomy"]=>
array(0) {
}
}
[1]=>
object(stdClass)#469 (45) {
["nid"]=>
string(3) "211"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291281467"
["changed"]=>
string(10) "1301323440"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "218"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(53) "Mss ( Privaatpraktijk kinesitherapie Walravens Marc )"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323440"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_revaki"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(3) "128"
}
}
["field_stagedomein_verpleeg"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(14) "niet opgegeven"
}
}
["field_status_datum"]=>
array(1) {
[0]=>
array(4) {
["value"]=>
NULL
["timezone"]=>
string(15) "Europe/Brussels"
["timezone_db"]=>
string(15) "Europe/Brussels"
["date_type"]=>
string(4) "date"
}
}
["field_locatieview"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "210"
}
}
["field_status_extra"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(6) "Actief"
}
}
["field_maxcapstud_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(1) "4"
}
}
["field_status_bevestigd_door"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_aanpers_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_extrainfo_stagedomein"]=>
array(1) {
[0]=>
array(2) {
["value"]=>
string(40) "Capaciteit: 1 student in periode 3 tem 6"
["format"]=>
NULL
}
}
["field_percapaciteit_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_aanplaats_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_mentoren"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "208"
}
}
["field_persoon_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["has_body"]=>
string(1) "0"
["taxonomy"]=>
array(0) {
}
}
[2]=>
object(stdClass)#472 (45) {
["nid"]=>
string(3) "217"
["type"]=>
string(11) "stageplaats"
["language"]=>
string(2) "nl"
["uid"]=>
string(2) "33"
["status"]=>
string(1) "1"
["created"]=>
string(10) "1291281906"
["changed"]=>
string(10) "1301323440"
["comment"]=>
string(1) "0"
["promote"]=>
string(1) "0"
["moderate"]=>
string(1) "0"
["sticky"]=>
string(1) "0"
["tnid"]=>
string(1) "0"
["translate"]=>
string(1) "0"
["vid"]=>
string(3) "224"
["revision_uid"]=>
string(2) "16"
["title"]=>
string(54) "Mss ( Privaatpraktijk kinesitherapie Peeters Stefaan )"
["body"]=>
string(0) ""
["teaser"]=>
string(0) ""
["log"]=>
string(0) ""
["revision_timestamp"]=>
string(10) "1301323440"
["format"]=>
string(1) "0"
["nd_switch_bm"]=>
string(0) ""
["name"]=>
string(12) "stage.revaki"
["picture"]=>
string(0) ""
["data"]=>
string(72) "a:1:{s:13:"form_build_id";s:37:"form-f89b99e4a5249b192ff472579b826b00";}"
["field_stagedomein_audiologo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_geneeskunde"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_lo"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_stagedomein_revaki"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(3) "128"
}
}
["field_stagedomein_verpleeg"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(14) "niet opgegeven"
}
}
["field_status_datum"]=>
array(1) {
[0]=>
array(4) {
["value"]=>
NULL
["timezone"]=>
string(15) "Europe/Brussels"
["timezone_db"]=>
string(15) "Europe/Brussels"
["date_type"]=>
string(4) "date"
}
}
["field_locatieview"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "213"
}
}
["field_status_extra"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_status_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(6) "Actief"
}
}
["field_maxcapstud_stagedomein"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
string(1) "6"
}
}
["field_status_bevestigd_door"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_aanpers_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
NULL
}
}
["field_extrainfo_stagedomein"]=>
array(1) {
[0]=>
array(2) {
["value"]=>
string(38) "Capaciteit: 1 student in alle periodes"
["format"]=>
NULL
}
}
["field_percapaciteit_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_aanplaats_stageplaats"]=>
array(1) {
[0]=>
array(1) {
["value"]=>
NULL
}
}
["field_mentoren"]=>
array(1) {
[0]=>
array(1) {
["nid"]=>
string(3) "214"
}
}
["field_persoon_stagedomein"]=>
array(2) {
[0]=>
array(1) {
["nid"]=>
string(3) "216"
}
[1]=>
array(1) {
["nid"]=>
string(3) "215"
}
}
["has_body"]=>
string(1) "0"
["taxonomy"]=>
array(0) {
}
}
Well, as far as I can tell, you've actually assigned an array to the numerous variables in the object. As a result, you will need to do something like this in your foreach loop:
global $gStartPositionStudents;
global $gStartPositionInternships;
$rows = array();
foreach($gStartPositionStudents as $value) {
// each loop will add a row here.
$row = array();
// build the row
$row[] = array('data' => $value->field_naam_student[0]['value']);
$row[] = array('data' => $gStartPositionInternships->field_stagedomein_revaki);
// add the row to the "big row data (contains all rows)
$rows[] = array('data' => $row);
}
$output = theme('table', $header, $rows);
return $output;