Link to home
Start Free TrialLog in
Avatar of Pete Winter
Pete WinterFlag for United Kingdom of Great Britain and Northern Ireland

asked on

dynamic variable name

I want my variable name to be dynamic variable. See my code below...

$media_brand_listed . $row_rs_ocg_brands2['brand_name'] = "Yes";

Open in new window


i.e. Say $row_rs_ocg_brands2['brand_name'] equals HP I want the variable name to be...

$media_brand_listedHP = "Yes";

What I have done is wrong. How should I do it?
ASKER CERTIFIED SOLUTION
Avatar of Slimshaneey
Slimshaneey
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pete Winter

ASKER

Perfect. Many thanks