Okay, lets say I have a database table row result called "
$service", inside of this row, there is a column called "
svcTitle".
Right now the contents of
$service['svcTitle'] is "
$arr['media:group']['media:title']['value']".
This is an XML request, and it returns the title in a YouTube video... which is "
This is the title"
The code below will output the following result:
Code:
$title = $service['svcTitle'];
echo $title;
Quote:
$arr['media:group']['media:title']['value']
|
But if I use this code instead, it will output the following instead:
Code:
$title = $arr['media:group']['media:title']['value'];
echo $title;
I'm trying to use the following, but I am getting an error instead:
Code:
$title = $service['svcTitle'];
eval("\$title = \"$title\";");
echo $title;
Quote:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/eightway/public_test/media/media_submit.php(48) : eval()'d code on line 1
$arr['media:group']['media:title']['value']
|
What am I doing wrong?