Jump to content

Array Variable Select


iwpg

Recommended Posts

Hello, I am having issues assigning an array value to a variable.

Simple enough, I get $bidStrategy with a value of MANUAL_CPC fine, however the $bid variable is too complex for me. Thank you!

 

I hate to ask and don't want to cheat, but does anyone know of a tool that will give you these variables from an array? I have a lot of this going on in the code that I need to solve with little time to dedicate.

foreach ($page->entries as $adGroupCriterion) {
$bidStrategy = $adGroupCriterion->biddingStrategyConfiguration->biddingStrategyType;
$bid = $adGroupCriterion->biddingStrategyConfiguration->bids->CpcBid->bid->Money->microAmount;
}

The Array: 
[biddingStrategyConfiguration] => BiddingStrategyConfiguration Object (
[biddingStrategyType] => MANUAL_CPC

	[biddingScheme] => ManualCpcBiddingScheme Object (
	[enhancedCpcEnabled] =>
	[BiddingSchemeType] => ManualCpcBiddingScheme
		[_parameterMap:BiddingScheme:private] => Array (
		[BiddingScheme.Type] => BiddingSchemeType
		)
	)
	[bids] => Array (
		[0] => CpcBid Object (
			[bid] => Money Object (
			[microAmount] => 3500000
			[ComparableValueType] => Money
				[_parameterMap:ComparableValue:private] => Array (
				[ComparableValue.Type] => ComparableValueType
				)
			)
		[contentBid] =>
		[cpcBidSource] => ADGROUP
		[BidsType] => CpcBid
			[_parameterMap:Bids:private] => Array (
			[Bids.Type] => BidsType
			)
		)
	)
)
Link to comment
https://forums.phpfreaks.com/topic/286007-array-variable-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.