RSS Feed/News fields as vars?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,675
Points
823

Reputation:

How can I do:
Code:

Code:
$item->color =
$item->size =
$item->weight =

as

Code:

Code:
$fieldList = "color, size, weight";
$fieldArray = explode(",",$fieldList);
foreach ($fieldArray as $k => $v)
{
 $item->$v = something;
}

Continue reading...
 
Status
Not open for further replies.
Top