jcbflorida
-
Posts
3 -
Joined
-
Last visited
Never
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.
Echo Part Of Array for Page Title ??? NEWBIE QUESTION
in Applications
Posted
Just getting started with PHP! I'm using a shopping cart software and I hate the way it picks the page title. The PHP code looks like this:
<title><?php echo $myPage->getConfig('shopname'); ?></title>
It causes every page title to be equal to the shopname:
$config['shopname'] = 'Our Shop';
I want change the code to reflect the product name not the shop name. The same file while $config['shopname'] = 'Our Shop'; is located has arrays for the products that look like this:
$products['14']['428'] =
array(
'productid' => '428',
'groupid' => '14',
'pagehref' => 'viewitem.php?groupid=14&productid=428',
'name' => 'BIG GREEN TOY CAR',
I've played with the php code using a get before after the <head> and before the <title> and changed the echo, but I just can't get it right. I want the title to be equal to the 'name'.
I hope someone who knows php better than me can advise on the correct code. HELP!?!?