Jump to content

Echo Part Of Array for Page Title ??? NEWBIE QUESTION


jcbflorida

Recommended Posts

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!?!?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.