Using the Recurly API, the following text is returned. What I'm trying to figure out is the easiest way with PHP to extract values from this string and place them into PHP variables.
I've looked at various methods within the PHP manual to find text but being new to PHP the exact process to actually get the values after I've found their location still not apparent to me.
For example, how would I pull the value for plan_code
and remove the quotes around the value so that the result is $plan = 'starter'
?
Recurly_Subscription[href=https://api.recurly.com/v2/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxx] account=<Recurly_Stub[account] href=https://api.recurly.com/v2/accounts/1>, activated_at="2012-07-14 12:55:47 +00:00", currency="USD", current_period_ends_at="2012-08-14 12:55:47 +00:00", current_period_started_at="2012-07-14 12:55:47 +00:00", plan="Recurly_Plan[href=https://api.recurly.com/v2/plans/starter] name="Starter", plan_code="starter", setup_fee_in_cents="<Recurly_CurrencyList []>", unit_amount_in_cents="<Recurly_CurrencyList []>">", quantity=2, state="active", subscription_add_ons=[], unit_amount_in_cents=1200, uuid="1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3"